![]() |
array gone wrong.
This is the little piece of code I'm trying to get working.
PHP Code:
Now, it does call it, but it doesn't loop. It does 1x2, and stops there. But if I replace "$priceids" with "1, 2, 3", it works just fine. It multiplies 1x2, then 2x2, then 3x2. The results with $priceids in the array is just "2". But the results for "1, 2, 3" in the array is "246". Is there a way around this issue? Thanks in advance. |
try
PHP Code:
PHP Code:
|
This is my result when I put
print_r($arr); Array ( [0] => 1, 2, 3 ) And when I tried $arr as $key => $value, gave me the same result as before. Just plain 2. |
the fix is
PHP Code:
|
Quote:
PHP Code:
Actually, if the rusults of $row_call_albums['priceids'] has the format of 1, 2, 3 then you should explode it into array with ',' not ' '. |
Since they are comma seperated the explode should be using a comma, not a space ;
Quote:
|
All times are GMT. The time now is 03:55 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|