Php Parse Error Syntax Error Unexpected T_double_arrow
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site syntax error unexpected t_double_arrow in codeigniter About Us Learn more about Stack Overflow the company Business Learn more
Syntax Error, Unexpected '=>' (t_double_arrow) Yii2
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Unexpected >
Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax
Php Syntax Error Unexpected
error, unexpected T_DOUBLE_ARROW PHP [closed] up vote 3 down vote favorite 1 I'm getting a Parse error: syntax error, unexpected T_DOUBLE_ARROW PHP on line 47, which is 'post_content' => $thisShow['content'], Anyone got any ideas why? protected function _saveShow($thisShow) { $saveData = array( 'mid' => $this->_saveAsUserId, 'post_title' => $thisShow['title'], 'post_name' => slug($thisShow['title'], 'post_content' => $thisShow['content'], 'post_date' => date('Y-m-d H:i:s'), 'post_date_gmt' => date('Y-m-d H:i:s'), 'category_id' => 4, syntax error, unexpected '[', expecting ')' 'post_author' => 0, 'category_name' => $thisShow['category_name'] ); // $this->_database->insert('wp_posts', $saveData); } php arrays syntax-error share|improve this question edited Apr 12 '10 at 14:11 Gumbo 396k64548668 asked Apr 12 '10 at 14:05 Belgin Fish 4,4222570106 closed as too localized by HamZa, andrewsi, Sindre Sorhus, Maerlyn, danodonovan Jun 20 '13 at 10:36 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 1 Answer 1 active oldest votes up vote 13 down vote accepted you didn't close your parenthesis on the prior line: 'post_name' => slug($thisShow['title']), share|improve this answer edited Nov 28 '11 at 18:37 answered Apr 12 '10 at 14:07 GSto 18.4k25104160 thanks a bunch :D –Belgin Fish Apr 12 '10 at 15:33 just to be clear, I think you mean it should read 'post_name' => slug($thisShow['title'
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn parse error in php more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags append to array php Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, php associative array helping each other. Join them; it only takes a minute: Sign up PHP: Parse Error: unexpected T_DOUBLE_ARROW up vote 0 down vote favorite My code gives me the error Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')' line http://stackoverflow.com/questions/2622624/parse-error-syntax-error-unexpected-t-double-arrow-php 208 I keep getting this but it looks correct? Line 208 which is the second down. array( "name" => "Colour Scheme", "desc" => "Select the colour scheme for the theme", "id" => $shortname."_color_scheme", "type" => "select", "options" => array("blue", "red", "green"), "std" => "blue"), please advise! Thanks php syntax-error share|improve this question edited Jan 31 '11 at 3:08 alex 267k129653807 asked Jan 31 '11 at 2:18 Brian 1111 1 There's no error here. Often errors http://stackoverflow.com/questions/4847094/php-parse-error-unexpected-t-double-arrow can come up on a line, when the problem is actually right before it (for example missing ; at line end). Please show more of your code. –Jonah Jan 31 '11 at 2:26 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote T_DOUBLE_ARROW is the token for =>, so you have one which appears somewhere the parser doesn't expect it. Besides that trailing ,, there is no error with the code you posted. share|improve this answer answered Jan 31 '11 at 2:20 alex 267k129653807 Thanks for the response. Here is some code just before and after. –Brian Jan 31 '11 at 20:53 add a comment| up vote 0 down vote Besides that trailing ,, there is no error with the code you posted. -- alex Often errors can come up on a line, when the problem is actually right before it (for example missing ; at line end) -- Jonah My bet is that Jonah is correct and that the error in the line above this array. From the context of the trailing , I bet this is a mutli-dimensional array. If you include the code around your array I bet the problem is the line above. Good luck. share|improve this answer answered Jan 31 '11 at 2:35 Yzmir Ramirez 1,095610 array( "name" => "General", "type" => "se
Involved Learn how you can get involved with the project. 3.1 New Features An overview of the new https://www.phpbb.com/customise/db/mod/acp_add_user_mod/support/topic/95508 features and improvements in phpBB 3.1 (The new version of phpBB). https://www.experts-exchange.com/questions/28322014/PHP-dynamically-populating-array-getting-PHP-Parse-error-syntax-error-unexpected-T-DOUBLE-ARROW.html The Team Find out who is responsible for all the mayhem. Contact Us Have a question the forums don't answer? Come here. Advertising Information if you want to advertise on phpBB.com. Find out more about the project » Downloads Latest Version Download the latest stable release of syntax error phpBB Update Packages Automatic Update packages for your phpBB release Language Packs Translate phpBB into (almost) any language you like Extensions Download extensions to enhance phpBB’s functionality Styles Your forums need a new look? Browse our Styles DB Official Tools Official tools by the phpBB team to assist you with your board Customise Customisation Database Our customisation database syntax error unexpected contains just about everything you might need to customise your phpBB board to your liking. In it you will find Extensions (for 3.1.x), MODs (for 3.0.x), Styles, Language Packs, BBCodes, as well as various tools. Extensions (3.1.x) Guides on how to use them and how to create your own. Extensions DB Download or submit extensions to our extensions database. Modifications (3.0.x) Guides on how to use them and how to create your own. Modifications DB Download or submit modifications to our MODs database. Styles Guides on how to use them and to create your own styles. Styles DB Download or submit styles to our styles database. More resources on customising your board » Support Documentation Installation guide and the complete documentation. Knowledge Base Team and user submitted articles covering support areas. Flash Tutorials View Flash Tutorials that help you with the use of phpBB. phpBB Support The Support related areas in our community forums. IRC Support Old school? Visit the IRC support channel on freenode. International Support Find a 3rd party suppor
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > PHP dynamically populating array getting PHP Parse error: syntax error, unexpected T_DOUBLE_ARROW Want to Advertise Here? Solved PHP dynamically populating array getting PHP Parse error: syntax error, unexpected T_DOUBLE_ARROW Posted on 2013-12-19 PHP Web Languages/Standards-Other Web Servers 2 Verified Solutions 15 Comments 1,666 Views Last Modified: 2014-01-05 I have an object which I format it and parse it as html, meanwhile I want to populate the formatted items to an array to be sent a different page. My code is something like: $reply = array(); function writeList($items){ if($items === null) return; foreach($items->children() as $i => $child){ $y = $child->getName(); $x = (string)$child; if ($x==""){$x="Header";} $reply( (string)$y => $x, ); .... } writeList($child); } writeList($xml); var_dump($reply); But I am getting error PHP Parse error: syntax error, unexpected T_DOUBLE_ARROW in the line (string)$y => $x,. Can someone guide me how to solve it please? 0 Question by:Ashraf Hassanein Facebook Twitter LinkedIn Google LVL 107 Active today Best Solution byRay Paseur Some good learning resources for people starting out in PHP are available here: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html Go to Solution 15 Comments LVL 30 Overall: Level 30 PHP 26 Web Languages/Standards-Other 6 Web Servers 2 Message Active 2 days ago Expert Comment by:Marco Gasi2013-12-19 This code doesn't make sense to me: $reply( (string)$y => $x, ); Select all Open in new window In fact it has the syntax as $reply were a function, but it is an array and that code I think should add an item to that array so you have to replace above lines with this one $reply[] = (string)$y => $x; Cheers 0 Message Author Comment by:Ashraf Hassanein2013-12-19 I found array $reply is used somewhere else in the script so I changed the name array to $output, and now I have the code like this: $outpu