Hi I have this function and it returning a notice:
Notice: Uninitialized string offset
function generaterandomkey($length) {
$string=\'\'
the best way : convert your string expression to array and then convert to string like this:
function readnumber know a number with any length:
function readnumber($str, $i)
{
$string=$str;
$number = '';
$s="";
for($j=0;$jis_number($s[$i]))
$number .= $s[$i++];
return $number;
}
can use it like this:
$str="154+458-8";
$number=readnumber($str,1);
echo($number);