Jump to content

Unexpected '[' Problem


Nikki-M

Recommended Posts

Hello everybody.

 

Sorry, quite new to PHP; can somebody take a look at this little bit of code and explain why I am getting Parse error: syntax error, unexpected '['

 

<?php

for ($i=0;$i<count($raw_wind_dir);$i++) {
$sin_direction[] = sin(deg2rad($raw_wind_dir[$i]));
$cos_direction[] = cos(deg2rad($raw_wind_dir[$i]));

?>
}

 

Many thanks for reading

 

Regards

Nikki

 

Link to comment
https://forums.phpfreaks.com/topic/133908-unexpected-problem/
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.