Search found 17 matches

by UnimatrixZer0
Mon Dec 08, 2003 5:25 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

It works! Thanks to all who helped with this question! :D
by UnimatrixZer0
Mon Dec 08, 2003 5:20 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

Nevermind... Figured out that the $results array was inside a function, therefore not global... And when called on outside that function contained nothing...

Silly me. lol
by UnimatrixZer0
Mon Dec 08, 2003 4:53 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

The problem is that it returns nothing from the results array.
by UnimatrixZer0
Sat Dec 06, 2003 6:59 pm
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

<?php while($i != 9) { $articleNum = $results[$i][1]; $productPackage = $results[$i][2]; $quantity = $results[$i][3]; $price = $results[$i][4]; $gst = $results[$i][5]; } ?> That is continued from your example earlier in this thread... In the code above, I'm trying to extract each of the 5 pieces of...
by UnimatrixZer0
Sat Dec 06, 2003 3:21 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

This is the only thing I'm still stuck on now
by UnimatrixZer0
Thu Dec 04, 2003 6:15 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

Continuing on from the example you gave above, this is what I have: foreach($res as $line) { $articleNum = $line[1]; $productPackage = $line[2]; $quantity = $line[3]; $price = $line[4]; $gst = $line[5]; I think I may have thrown myself in too deep... lol. Thanks for your help.
by UnimatrixZer0
Thu Dec 04, 2003 5:40 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

I'm having trouble figuring out how to get each line out in a variable from that array?
by UnimatrixZer0
Thu Dec 04, 2003 2:13 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

Nevermind, I figured it out... Thanks!
by UnimatrixZer0
Thu Dec 04, 2003 1:59 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

awesome... It works...

But how do I pull individual result out of that array?
by UnimatrixZer0
Wed Dec 03, 2003 6:42 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

That line you have quoted has two products in it... and a few blank things at the end.

I could make it so each product is on a new line in the record, ie:

3315|Pencils|2|10.24|ON
3320|Textas|2|15.32|ON
||||
||||

If you think it would be easier to extract the data?
by UnimatrixZer0
Wed Dec 03, 2003 6:37 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

Here is the entire code, if that helps you understand my problem a bit better? Thanks again. mysql_connect("localhost", "user", "password") or die("Unable to connect to MySQL"); mysql_select_db("database") or die("Unable to select database"...
by UnimatrixZer0
Wed Dec 03, 2003 6:25 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

I suppose I thought that storing all the individual return article lines in a seperate database and linking them together would require heaps of information being exchanged all over the place... Where if I put it all in one record, it would save a lot of time and effort for the purpose the script is...
by UnimatrixZer0
Wed Dec 03, 2003 6:04 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

There are a whole heap of other fields pertaining to other information... This particular set of details (returnArticles field) must be directly related to the record, and because there would be a lot of information going through the database, I didn't want to make another database that stores each ...
by UnimatrixZer0
Wed Dec 03, 2003 5:50 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

$esraQuery = mysql_query("SELECT * FROM eSRA WHERE id='$esra'"); $esraContent = mysql_fetch_array($esraQuery); mysql_close(); This is the block of data in the field "returnArticles": |1921|Pump|2|24||3315|Cherry Coke|4|13.52|ON|242|Coke|6|11.21|ON|||||||||||||||||||||||||||||||||...
by UnimatrixZer0
Wed Dec 03, 2003 5:34 am
Forum: PHP - Code
Topic: [SOLVED] split() in PHP
Replies: 28
Views: 3595

Sorry to ask all these questions, but could you give an example of what you are talking about...

I've been writing PHP and using mySQL for a while, but I can't seem to overcome this problem. Thank you for all your help so far :)