Php Error 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
Syntax Error Unexpected T_double_arrow In Php
site About Us Learn more about Stack Overflow the company Business Learn more syntax error, unexpected '=>' (t_double_arrow) laravel about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x syntax error unexpected t_double_arrow in codeigniter Dismiss 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 Error, Unexpected '=>' (t_double_arrow) Yii2
syntax 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' =>
Unexpected >
4, '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'
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 php syntax error unexpected Overflow the company Business Learn more about hiring developers or posting ads with us
Parse Error In Php
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community syntax error, unexpected '[', expecting ')' of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse error unexpected t_double_arrow what's wrong? up vote -2 down vote favorite array_push($data, $_POST['username'] =>array("url" =>"uploadedfiles/" http://stackoverflow.com/questions/2622624/parse-error-syntax-error-unexpected-t-double-arrow-php . $_FILES['file']['name'] ,"pass"=>$_POST['password'])); This is the line that the error occurs on, is there something I'm doing wrong? php share|improve this question asked Feb 2 '14 at 20:20 user3079557 4 There is a syntax error in your code. => can only be used under certain circumstances (array, foreach). What are you trying to achieve? –Bugs Feb 2 '14 at 20:25 add a comment| 1 Answer 1 active oldest votes up http://stackoverflow.com/questions/21515692/parse-error-unexpected-t-double-arrow-whats-wrong vote 0 down vote You can not do the way you are trying. If I understood you are setting $_POST["username"] with some array value and then pushing into an array and if so the correct way should be $_POST['username'] = array ( "url" =>"uploadedfiles/" . $_FILES['file']['name'] , "pass"=>$_POST['password'] ); array_push($data, $_POST['username']); array_push is used to push element in existing array http://in2.php.net/manual/en/function.array-push.php Here is an example how it works $data =array("kk"); array_push($data, array("a","b")); print_r($data); output :: Array ( [0] => kk [1] => Array ( [0] => a [1] => b ) ) share|improve this answer edited Feb 2 '14 at 20:49 answered Feb 2 '14 at 20:29 Abhik Chakraborty 37.1k41737 Warning: array_push() expects parameter 1 to be array, null given –user3079557 Feb 2 '14 at 20:39 what is ur $data array ? does it contain anything if not then u will get this error. –Abhik Chakraborty Feb 2 '14 at 20:40 $data=array("user1"=>array("url"=>"user1.pphp","password"=>"pass1"), "user2"=>array("url"=>"user2.php","password"=>"pass2"), "user3"=>array("url"=>"user3.php", "password"=>"pass3")); –user3079557 Feb 5 '14 at 17:05 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your
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 http://stackoverflow.com/questions/24259015/parse-error-syntax-error-unexpected-t-double-arrow Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack https://www.phpbb.com/customise/db/mod/acp_add_user_mod/support/topic/95508 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 error, unexpected '=>' (T_DOUBLE_ARROW) syntax error [closed] up vote -2 down vote favorite Why would I get Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) when I use this in a prepared PDO statment. $stmt->execute( ':name' => $nme, ':street' => $strt, ':suburb' => $sbrb, ':city' => $cty, ':province' => $cnty, ':country' => $cntry ); It was dont on the example of $id = 5; $name = "Joe the Plumber"; try { $pdo = new syntax error unexpected PDO('mysql:host=localhost;dbname=someDatabase', $username, $password); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $pdo->prepare('UPDATE someTable SET name = :name WHERE id = :id'); $stmt->execute(array( ':id' => $id, ':name' => $name )); echo $stmt->rowCount(); // 1 } catch(PDOException $e) { echo 'Error: ' . $e->getMessage(); } php share|improve this question asked Jun 17 '14 at 8:24 morne 1,4042932 closed as off-topic by Niet the Dark Absol, billyonecan, AD7six, Fluffeh, Sergiu Paraschiv Jun 17 '14 at 8:47 This question appears to be off-topic. The users who voted to close gave this specific reason:"This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Niet the Dark Absol, billyonecan, AD7six, Fluffeh, Sergiu ParaschivIf this question can be reworded to fit the rules in the help center, please edit the question. 1 You need to pass an array to execute –billyonecan Jun 17 '14 at 8:25 Basically, you forgot the array( ... ) part ;) –Niet the Dar
Involved Learn how you can get involved with the project. 3.1 New Features An overview of the new features and improvements in phpBB 3.1 (The new version of phpBB). 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 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 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 support site in your first language. More information on support » Development Area51 phpBB Development All Development Discussion takes place at Area51. Bug tracker, development wiki, continuous integration and other development tools are located he