Replace array key with new array key.

I found that in my model, if the table columns were not explicity set, I ran into problems. This is the block of code I used to check an options array, and replace any non explicit table columns with explicit ones.

* This block will take any option keys that do not have a table
* explicitly set, and will append the given table to them.
foreach ($options as $key=>$value){
if (!in_array($key,$keywords)){
if (!preg_match (‘/[^a-z]/i’, $key)) {
}//end if
}//end if
}//end foreach

This entry was posted in Computers.

Post a Comment

You must be logged in to post a comment.