The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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. |
#2
|
||||
|
||||
try
PHP Code:
PHP Code:
|
#3
|
||||
|
||||
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. |
#4
|
||||
|
||||
the fix is
PHP Code:
|
#5
|
||||
|
||||
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 ' '. |
#6
|
||||
|
||||
Since they are comma seperated the explode should be using a comma, not a space ;
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|