Jump to content

[SOLVED] I'm either stupid or blind...


thesoggycow

Recommended Posts

So here is my script...

 

<?

$number = $_GET['number'];

$length = strlen($number);

$prearray = chunk_split($number,1,".");

$number = explode(".", $prearray);

$omg = 0;

$i = 0;

while ($i < $length){

if ($omg == 2){

$moo = $length - $i;

$tempfinalnumber = $finalnumber;

$finalnumber = $tempfinalnumber.",".$number['$moo'];

$omg = 0;

}

else{

$moo = $length - $i;

$tempfinalnumber = $finalnumber;

$finalnumber = $tempfinalnumber.$number['$moo'];

$omg = $omg+1;

}

$i++;

}

echo $finalnumber;

?>

 

I get the error,

PHP Parse error:  parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /comma.php on line 6

 

I don't see any variables starting with numbers... I gotta be blind... or am I just stupid?

 

Keaton

Link to comment
https://forums.phpfreaks.com/topic/49028-solved-im-either-stupid-or-blind/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.