SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Pulling info...
-
Nov 25, 2000, 19:37 #1
- Join Date
- Aug 2000
- Location
- Houston, TX, USA
- Posts
- 6,455
- Mentioned
- 11 Post(s)
- Tagged
- 0 Thread(s)
I have some info in a MySQL DB and it has spaces in it..... I have put it into an array, now how do I display it? I have tried echo() and print() any suggestions?
Thanks,ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC
-
Nov 25, 2000, 20:10 #2
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So the info is in the array already
two ways
for($i=0;$i<count($arrayname);$i++) {
print $arrayname[$i];
}
OR
while (list($key,$value) = each ($arrayname)) {
print $value;
}Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Nov 25, 2000, 21:47 #3
- Join Date
- Aug 2000
- Location
- Silicon Valley
- Posts
- 2,241
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I normally use the first way if the array is not a hashtable (key-value pairs)
- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy
Bookmarks