foreach in mail |
[eluser]E303[/eluser]
Thanks for that tonanbarbarian, I seem to be getting closer but now the return is: <p>D D<br />3 3<br /> </p> It should have printed out <p> Demo 2 32.50<br /></p> instead it seems to grab the $item_row['title'] & $item_row['price'] twice but only use the first charaters.
[eluser]TDSPower[/eluser]
Have you tried to echo $item_row[’title’] & $item_row[’price’]. Maybe the error come from your DB, not from the foreach.
[eluser]E303[/eluser]
Yes, Code: $items = ''; The error seems to be when I run the above code. Is there any other way of reading a foreach loop into the mail function?
[eluser]Seppo[/eluser]
The solution is Code: //Replace this
[eluser]E303[/eluser]
already done that. I am starting to think that maybe there is an error in the row_array(); code? *Update I tried result_array(); which through back errors so that doesn't work.
[eluser]E303[/eluser]
I have update the code from what I originally posted. What I have found out is that when there is only 1 item the entire name gets email (which is the idea). When there is two items or more that is when I get this first charater business. Code: function mailOrder() |
Welcome Guest, Not a member yet? Register Sign In |