Thursday 30 August 2018
Subscribe to:
Post Comments (Atom)
$myarray = array(
"12aaa"=>"hammer",
"22bbb"=>"pinchbar",
"33ccr"=>"wood" );
include 'myarray.inc.php';
while($row = $db->fetchAssoc()){
foreach($row as $key => $val)
if $val has a match in myarray.inc.php
{
$val = str_replace($val,my_array_key);
}
}
array_search
which will return the key associated with a given value, if it exists.$result = array_search( $val, $myarray );
if ($result !== false) {
$val = $result;
}
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment