Prolem with if function [closed]

By : Ryan

something seems to be wrong with the first line of this if function, seems alright to me though.

if ($count1 == sizeof($map) && $count2 == sizeof($map[0])){
echo ";";
echo ",";

This is the error I get (line 36 is the first line of the above line.)

Parse error: parse error in C:\wamp\www\game\mapArrayConvertor.php on line 36

EDIT: The OP notes in an answer below that the error was a missing semi-colon on line 35 and not the code included in the question.

By : Ryan


You already found the problem, but... if this is just turning an array into a comma separated list, you could use the implode command to do it for you.

By : Powerlord

You could try:

if (($count1 == sizeof($map)) && ($count2 == sizeof($map[0]))){

Seems I missed a ";" on line 35, sorry guys.

By : Ryan

This video can help you solving your question :)
By: admin