Jump to content

[SOLVED] Problems with array_push


Michan

Recommended Posts

Hi everyone,

 

For some reason I am having problems inserting a new key/value into an existing array using array_push().

 

$i1 = array('number1' => 'Hello!');

array_push($i1, 'number2' => 'Hmm.');

 

Parse error: syntax error, unexpected T_DOUBLE_ARROW on line 5

 

What's going on here? :o

 

Many thanks in advance.

 

- Mi

Link to comment
https://forums.phpfreaks.com/topic/81156-solved-problems-with-array_push/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.