Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
4 + 6 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: HELP: nested if condition doesn't give expected result for formatting
by Catzwolf on 2006/1/19 6:48:01

In your php did you use trim() on the var? If not I would suggest that you do :)

Nice catch :)
Re: HELP: nested if condition doesn't give expected result for formatting
by fly2moon2 on 2006/1/19 6:39:38

Hi all!


I've found out the problem. There must be some trailing spaces follow the array values. I use the truncate modifier to limit the string into 2 characters only, then it works!

le="color: #000000"><?php <{if ($item_set[item_data].status|truncate:2:"") == 'LV'}> ....................



Thanks for your assistance!
jl
Re: HELP: nested if condition doesn't give expected result for formatting
by fly2moon2 on 2006/1/19 6:28:23

Thanks John and m0nty,


I also thought that the array doesn't have any value of 'LV'. But, as seen in my code, I've already show up the value of <{$item_set[item_data].status}> at the table cell. I do see occurences of 'LV' in the table.

Result is not expected and I double-check at the html page source; I don't the condition pointing to the correct path.

thanks,
jl
Re: HELP: nested if condition doesnt give expected result for formatting
by m0nty on 2006/1/19 6:10:43

also use [code ] not <code> on these forums ;)

would it not be tter also to define $item_set[item_data] in the php and just use if ($emp_id == ) in the template?
Re: HELP: nested if condition doesn't give expected result for formatting
by Catzwolf on 2006/1/19 5:59:16

The code and nest look fine to me.

Are you sure that this element of the array $item_set[item_data].status has the var you expect?

I suggest you do a print_r($item_set) and see if the key has the value you believe it has.

Who's Online

216 user(s) are online (177 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits