Hi Any php expert here for fix my problem Error in php 5 is Notice: Undefined variable: code in G:\wamp\www\projects\handicraftcorner\include\functions.php on line 58 Notice: Undefined variable: code in G:\wamp\www\projects\handicraftcorner\include\functions.php on line 58 In function.php I am using this code for ($i=0;$i<$mach;$i++) { unset ($code); $ids = array_rand ($let, $num); foreach ($ids as $val) $code .=$let[$val]; $return=strtoupper($code); } PHP: Any one help me ? I need urgent help Thanks in advance
It is saying that when the script gets to line 58 $code has no value. So... is line 58 where you try to unset it? or where you try to add a value to it. I'd recommend trying for ($i=0;$i<$mach;$i++) { $code = ''; $ids = array_rand ($let, $num); foreach ($ids as $val) $code .= $let[$val]; $return=strtoupper($code); } PHP: