![]() |
Newbie, problem with parse error unexpected T_CONSTANT_ENCAPSED_STRING - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Newbie, problem with parse error unexpected T_CONSTANT_ENCAPSED_STRING (/showthread.php?tid=23089) |
Newbie, problem with parse error unexpected T_CONSTANT_ENCAPSED_STRING - El Forum - 09-29-2009 [eluser]The Beginner[/eluser] I k now this is simple for most of you but i am still a beginner. When I call the function below I get unexpected T_CONSTANT_ENCAPSED_STRING in C:\xamp\htdocs\wpapp\models\wpHeaderModel.php on line 39 [code] function getSplashData() { for ($counter = 0; $counter <= 59; $counter++) { ====> this is line 39 $arr[$counter] = "\"<div style=\"height:700px; width:700px;background-color: rgb (256,256,256);\"><img /></div>\""; } $name = 'arr'; $jsdata['jsvar'] = array_to_js_string($arr, $name); $return($jsdata); } Please Help, Thanks :-S Newbie, problem with parse error unexpected T_CONSTANT_ENCAPSED_STRING - El Forum - 09-29-2009 [eluser]The Beginner[/eluser] I am not sure what happened above but part of the line is missing, Code: function getSplashData() Newbie, problem with parse error unexpected T_CONSTANT_ENCAPSED_STRING - El Forum - 09-29-2009 [eluser]The Beginner[/eluser] Still missing?hj%^&*()_ Code: $arr[$counter] = "\"<div style=\"height:700px; width:700px;background-color: rgb(256,256,256); Newbie, problem with parse error unexpected T_CONSTANT_ENCAPSED_STRING - El Forum - 09-29-2009 [eluser]The Beginner[/eluser] OK, if this don't do it I will quit, sorry No single quote in code I only added them here to try to get the code to stay put... Code: \"><img /></div>\""; ' Newbie, problem with parse error unexpected T_CONSTANT_ENCAPSED_STRING - El Forum - 09-29-2009 [eluser]The Beginner[/eluser] Ok, I am confused. The code will not post, I don't know why. Sorry. Newbie, problem with parse error unexpected T_CONSTANT_ENCAPSED_STRING - El Forum - 09-30-2009 [eluser]bigtony[/eluser] You could try this for the line in question: Code: $arr[$counter] = '<div style="height:700px; width:700px; background-color:rgb(256,256,256);"><img /></div>'; |