IT Community - Software Programming, Web Development and Technical Support

Append to an existing array?

This is a discussion on Append to an existing array? within the PHP Programming forums, part of the Web Development category; Does anybody know how to add values from an array into an array that has already been defined? Basically, Array ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-12-2007, 11:19 AM
muthukumar muthukumar is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 23
muthukumar is on a distinguished road
Default Append to an existing array?

Does anybody know how to add values from an array into an array that has already been defined?

Basically, Array 1 has been opened and closed, now a few sections down I need to enter more variables into the array, but through another array. Obviously I can do this by adding them directly into the firste array, but the second array is being pulled from a separate php file.

If anybody has any ideas.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-12-2007, 11:23 PM
raj raj is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 89
raj is on a distinguished road
Default Append to an existing array?

hi,

use this...


$arrFirst = Array();

$arrSecond = Array('addone','addtwo');

array_push($arrFirst, $arrSecond);

print_r($arrSecond);


i hope.. you are expected this..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append string from form input into existing file Archimedees PHP Programming 2 09-05-2007 01:23 AM
What’s the difference between the System.Array.CopyTo() and System.Array.Clone() ? Archer C# Programming 2 08-25-2007 03:00 AM
How to find that tools work well with your existing system itbarota Software Testing 1 07-23-2007 06:33 AM
change a password for an existing user via mysqladmin sivakumar Database Support 1 07-20-2007 02:55 AM
Write text on an existing PNG image in PHP sivaramakrishnan PHP Programming 1 07-17-2007 08:09 AM


All times are GMT -7. The time now is 02:27 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0