Log In
Sign Up
Why Join Hot Scripts?
Hot Scripts
All Categories
PHP
Python
Tools & Utilities
XML
Ruby on Rails
Ajax
Web Hosting
ASP
ASP.NET
C & C++
CFML
Flash
Java
JavaScript
CGI & Perl
HTML5
Forums
Blog
Scripts
Hosted Apps
Plugins
Design Templates
Forum
Blog
Advertise
Contact Us
Register
FAQ
Rules
Calendar
Search
Today's Posts
Mark Forums Read
RSS Feeds
Current location:
Hot Scripts Forums
»
Programming Languages
»
PHP
» Arrays with sub arrays
Arrays with sub arrays
LinkBack
Thread Tools
Display Modes
#
1
(
permalink
)
09-30-05, 03:19 PM
perleo
Coding Addict
Join Date: Jul 2003
Location: Ireland
Posts: 269
Thanks: 0
Thanked 0 Times in 0 Posts
Arrays with sub arrays
Hi
I have an array like this
Code:
array[0] ( array[0] ( name => val array[0] ( array() ) ) )
is there a way to get each array into sepearate arrays?
so as theres 3 array's in the above example, is there a way to get
$array0 = array( [values in here excluding sub arrays ] );
$array1 = array();
$array2 = array();
$array3 = array();
?
perleo
View Public Profile
Find all posts by perleo
#
2
(
permalink
)
09-30-05, 07:15 PM
Acecool
Aspiring Coder
Join Date: Nov 2003
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
$array1 = $array['1'];
$array2 = $array['2'];
$array3 = $array['1']['0'];
Or run a foreach, if is array continue and make a variable
$array{$i} = ...
__________________
Check Acecoolco.com for PHP Tutorials, and other tuts
If you plan on contacting me, please read this:
Legal Terms & Conditions
Acecool
View Public Profile
Visit Acecool's homepage!
Find all posts by Acecool
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Form Help
|
Security issue
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
Off
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Forum Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
General Community
Announcements
Polls
The Lounge
New Members & Introductions
Script Requests
HotScripts.com Discussion
Hot Scripts Forum Questions, Suggestions and Feedback
General HotScripts Site Discussion
HotScripts Site Bug Reports
General Web Coding
HTML/XHTML/XML
HTML5
JavaScript
CSS
Flash & ActionScript
Programming Languages
PHP
Perl
ASP
ASP.NET
C/C++
Visual Basic
Windows .NET Programming
Everything Java
Other Languages
Other Discussions
Web Servers
Database
Other Topics
Web Design
API
Frameworks
AJAX
Security
Server Administration
Portable Device Programming
Cloud Computing
Ruby on Rails
CFML
Python
Tools and Utilities
Remotely Hosted
Web Hosting
Advertising Forums
General Advertisements
Job Offers & Assistance
Traffic Exchange
Website Reviews
Web Hosting Talk
DBForums.com
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Compare arrays
drophit
PHP
0
07-09-05
03:33 PM
Structures vs. Arrays
addit
C/C++
1
07-06-05
02:10 PM
Can record arrays on database?
mhs12grade1992
PHP
5
02-17-05
11:20 AM
arrays in functions
Slypher
PHP
3
01-30-05
05:36 AM
Arrays
cebuy
PHP
1
10-25-04
07:40 AM
All times are GMT -5. The time now is
06:13 AM
.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Digg this Thread!
Add Thread to del.icio.us
Bookmark in Technorati
Share on Facebook
Share on Stumble Upon
Share on Twitter