PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
HI!
I'm trying to write a php page that formats MySQL results as XML - making all the files and stuff is quite straightforward but i need a way of chopping my $result array up into variables - the problem is that there will be 4 table rows in each $result, so there will be 4 PageNum and 4 PageID etc each time - how do i assign them to separate named variables?
Any help would be very gratefully received!!
thanks
mysql_fetch_array() should be what you want to use.... but the code you posted is missing a closing brace for the first while statement. also there is no place in your code where $L is incremented... are you getting an infinate loop? does the script output anything?
hi
sorry - in fact i only posted a small chunk of code - i left out the stuff before and after to save space ! I'm painfully inching forward to where i need to be - i've now found a way of making dynamic variable names but i need to write them to the xml file (4 variable values in each of the ten xml files) and it isn't happening