CodeIgniter Forums

Full Version: view problem... Parse error: syntax error, unexpected ';'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]moonshine[/eluser]
Hi
im getting a the parse error, syntax error, unexpected ';' and i cant see it (i can't see any semi-colons at all? )
ANYHOW here's the code



Code:
<?
//first i set up some vars (thease are all fine and have no semi-colons in them
$field_end = "_$image_num"."_$clue_num";
$file_field = "file$field_end";
$upload_field = "upload$field_end";
$caption_field = "caption$field_end";]
?>

...

//and now the error
<input type="text" style="margin-bottom:1; margin-left:0px; width:200px;" value="<?= ($image_uploaded ? $user_session_file_data[$session_array_key]['caption'] : ''?>" name="<?=$caption_field?>"/>

any suggestions greatly appreciated.

El Forum

[eluser]gtech[/eluser]
why is there a square bracket at the end of the $caption_field ="...."; line?

also you seem to have an open bracket on the value="<? ($image_uploaded.. but you are not closing the bracket.

El Forum

[eluser]moonshine[/eluser]
thanks gtech,
the square bracket was a copy and paste typo but... the closing parenthesis, i'd been staring at that for ages..

all fixed

El Forum

[eluser]gtech[/eluser]
your welcome