Cakephp 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
Unexpected T_double_arrow Php
site About Us Learn more about Stack Overflow the company Business Learn syntax error unexpected t_double_arrow in codeigniter more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Syntax Error, Unexpected '=>' (t_double_arrow) Yii2
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up php php syntax error unexpected - syntax error, unexpected T_DOUBLE_ARROW [duplicate] up vote 0 down vote favorite This question already has an answer here: PHP Parse/Syntax Errors; and How to solve them? 10 answers how i can rid of this error?? Parse error: syntax error, unexpected T_DOUBLE_ARROW in /var/www/core/restvt.api.php on line 35 PHP Code : $datax = Array(); foreach ($inis as $key => $data){ if ($data=="mem"){ $str = number_format($ARRAY[(array_search($data.':',$ARRAY)+2)]/1024,0,',','.')." syntax error, unexpected '[', expecting ')' MB [ ".number_format(($ARRAY[(array_search($data.':',$ARRAY)+2)]/$ARRAY[(array_search($data.':',$ARRAY)+1)])*100,0,',','.')." % ]"; array_push($datax, "mem"=>$str); //error here, why? }else{ array_push($datax,$data=>$ARRAY[(array_search($data.':',$ARRAY)+1)]); } } $jsonr = json_encode($datax); thx alot for your help... php syntax share|improve this question edited Dec 4 '13 at 2:00 asked Dec 4 '13 at 1:50 Andi Doank 6113 marked as duplicate by Cupcake, rahilwazir, Brilliand, Divi, Shankar Damodaranphp Users with the php badge can single-handedly close php questions as duplicates and reopen them as needed. Jun 7 '14 at 2:01 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. "mem"=>$str <--- what's this? –zerkms Dec 4 '13 at 1:53 variable string value from other array, i add for some string into it... –Andi Doank Dec 4 '13 at 1:57 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted I hate seeing people use array_push - I know it's legal. In this case, you can't push a key => value to your array, just do this instead: $datax['mem'] = $str; Manual: http://php.net/manual/en/function.array-push.php edit If you insist on using the array_p
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
Parse Error In Php
About Us Learn more about Stack Overflow the company Business Learn more about array_push in php hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Php Associative Array
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax http://stackoverflow.com/questions/20365334/php-syntax-error-unexpected-t-double-arrow error, unexpected T_DOUBLE_ARROW in PHP [closed] up vote 0 down vote favorite I'm trying to update functions.php with this, which is code copied straight from Attachments plugin on the website, but I'm getting a T_DOUBLE_ARROW syntax error, any ideas why? :- array( array( 'name' => 'title', // unique field name 'type' => 'text', // registered field type http://stackoverflow.com/questions/15090226/parse-error-syntax-error-unexpected-t-double-arrow-in-php 'label' => __( 'Title', 'attachments' ), // label to display 'default' => 'title', // default value upon selection ), array( 'name' => 'caption', // unique field name 'type' => 'textarea', // registered field type 'label' => __( 'Caption', 'attachments' ), // label to display 'default' => 'caption', // default value upon selection ), ); $args = array( // title of the meta box (string) 'label' => 'My Attachments', // all post types to utilize (string|array) 'post_type' => array( 'post', 'page' ), // meta box position (string) (normal, side or advanced) 'position' => 'normal', // meta box priority (string) (high, default, low, core) 'priority' => 'high', // allowed file type(s) (array) (image|video|text|audio|application) 'filetype' => null, // no filetype limit // include a note within the meta box (string) 'note' => 'Attach files here!', // text for 'Attach' button in meta box (string) 'button_text' => __( 'Attach Files', 'attachments' ), // text for modal 'Attach' button (string) 'modal_text' => __( 'Attach', 'attachments' ), // which tab should be the default in the modal (string) (browse|upload) 'router' => 'browse', // fields array 'fields' => $fields, ); $attachments->register( 'my_attachments', $args ); // unique instance name } add_actio
Involved Learn how you can get involved with the project. 3.1 New Features An overview of the new features and improvements https://www.phpbb.com/customise/db/mod/acp_add_user_mod/support/topic/95508 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. https://forums.phpfreaks.com/topic/171273-solved-parse-error-syntax-error-unexpected-t-double-arrow/ 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 syntax error 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 syntax error unexpected 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 D
Detected You currently have javascript disabled. Several functions may not work. Please re-enable javascript to access full functionality. [SOLVED] Parse error: syntax error, unexpected T_DOUBLE_ARROW Started by mattclements, Aug 21 2009 09:28 AM Please log in to reply 2 replies to this topic #1 mattclements mattclements Advanced Member Members 84 posts LocationLetchworth, Hertfordshire, UK Posted 21 August 2009 - 09:28 AM Hey all I am getting the following error: Parse error: syntax error, unexpected T_DOUBLE_ARROW with this code - seems like im missing something stupid! 08) && (date("d") < 15) ) { echo "selected"; }; ?> Matt Web Designer/PHP Developer/Server Admin Back to top #2 Garethp Garethp Advanced Member Members 1,026 posts LocationSydney, Australia Posted 21 August 2009 - 09:36 AM Shouldn't => be ==? I don't know much about =>, but it seems like it could be that. Also, ; does not go after } The Three Rules of Getting Assistance1. Google first2. Ask second3. Then buy me some chocolate Back to top #3 mattclements mattclements Advanced Member Members 84 posts LocationLetchworth, Hertfordshire, UK Posted 21 August 2009 - 09:41 AM Sorted it - Should be >= rather than =>=> is to do with setting arrays.Matt Web Designer/PHP Developer/Server Admin Back to top Back to PHP Coding Help · Next Unread Topic → 0 user(s) are reading this topic 0 members, 0 guests, 0 anonymous users Reply to quoted postsClear PHP Freaks → PHP Coding → PHP Coding Help Privacy Policy Forum Rules & Terms of Service · Change Theme IP.Board Mobile PHP Freaks PHP Freaks - English (USA) English (USA) PHP Freaks - English (USA) Mark Community Read Forums Members Pages Mark all as read Help Community Forum Software by IP.BoardLicensed to: PHP Freaks Sign In Use Facebook Use Twitter Need an account? Register now! Username Password I've forgotten my password Remember me This is not recommended for shared computers Sign in anonymously Don't add me to the active users list Privacy Policy