Jump to content

Unexpected T_Variable


Swarfega

Recommended Posts

Hey.

Making a simple while loop with an Array to bring me the required MSSQL querys, but it's resulting in Unexpected T_Variable and I can't find the problem as the same script worked in the past.

 

 

Here's the code

 

 


<?php
$array = array (32,
80,
96,
112,
128,
144,
160,
176,
192,
208,
224,
240,
256,
272,
288,
464,
480,
496,
512,
2608,
2640,
2736,
3360,
3424,
3488,
3504,
3520,
3584,
3648,
3680,
3712,
3760,
3792,
4000,
4032,
4096,
4128,
4176,
4192,
4208,
4288,
304,
320,
336,
352,
368,
384,
400,
416,
432,
448,
528,
554,
560,
576,
592,
608,
624,
640,
656,
672,
688,
704,
720,
736,
752,
768,
784,
816,
832,
848,
864,
880,
896,
912,
928,
944,
960,
976,
992,
1008,
1024,
1040,
1056,
1072,
1088,
1104,
1120,
1136,
1168,
1184,
1200,
1216,
1232,
1248,
1264,
1280,
1312,
1328,
1344,
1360,
1376,
1392,
1408,
1424,
1440,
1456,
1472,
1504,
1520,
1536,
1552,
1568,
1584,
1600,
1696,
1712,
1744,
1760,
1792,
1808,
1824,
1840,
1856,
1872,
188,
1904,
1920,
1936,
1952,
1984,
2000,
2016,
2032,
2048,
2064,
2080,
2096,
2112,
2128,
2144,
2160,
2192,
2208,
2224,
2256,
2272,
2304,
2320,
2336,
2352,
2368,
2384,
2400,
2416,
2432,
2448,
2464,
2480,
2496,
2512,
2528,
2544,
2560,
2576,
2592,
2624,
2656,
2672,
2688,
2704,
2720,
2752,
2768,
2784,
2800,
2816,
2832,
2848,
2880,
2912,
2928,
2944,
2960,
2976,
2992,
3008,
3024,
3040,
3056,
3072,
3088,
3104,
3120,
3136,
3152,
3168,
3184,
3200,
3216,
3232,
3280,
3296,
3312,
3328,
4320,
3268,
4400,
4416,
4608,
4640,
4672,
4688,
4720,
4768);

$i = 31;
$x = 5000;
while($i < $x) {
if(in_array($i, $array)) {
echo "Exec dbo.hiddenprocedure '".$i ."', 350000 <br/>";
}
$i = $i + 1;
}
?>

 

This is the error code

 

Parse error: syntax error, unexpected T_VARIABLE

 

 

Now the really stupid part is that I'm getting the same problem even if I use something like this

 

<?php

echo 'hi';

?>

 

So my first thought was the PHP tag, but that seems fine as well. Any ideas?

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