By: Haris
Date: 2010-03-31
Time: 22:41
|
Conditional show images and multi-dimensional arrayHi, I have a list of images in my page and I have to hide or show the images depending on the existence of some value in third dimension of an array i.e if the array contains a value 1 then show image 1 otherwise hide, if array has 2 then show image 2 etc.
any ideas or pointer on how can i achieve this? I hope that i have made my question clear. |
|
By: Skrol29
Date: 2010-04-01
Time: 01:55
|
Re: Conditional show images and multi-dimensional arrayHi Haris,
You can Hide or show an image using parameter "magnet". There is an example online, see section "Examples". |
|
By: Haris
Date: 2010-04-01
Time: 14:42
|
Re: Conditional show images and multi-dimensional arraythanks Skrol29 for your reply.
actually i want to do something like:
basically if the value in column provider in current row is google then display li otherwise hide it. Could you please help me out. |
|
By: Haris
Date: 2010-04-01
Time: 16:30
|
Re: Conditional show images and multi-dimensional arrayI have sorted out remove li with following code:
but now the issue is that blkNotConnected.provider only once. the array contains a list of names of connected providers. what i am trying to do is that I want to display two separate lists of connected and not connected providers using same array. I hope that this make sense. |
|
By: Haris
Date: 2010-04-01
Time: 16:53
|
Re: Conditional show images and multi-dimensional arrayI have also tried the following as suggested in: http://www.tinybutstrong.com/forum.php?msg_id=3285#
|
|
By: Skrol29
Date: 2010-04-02
Time: 00:09
|
Re: Conditional show images and multi-dimensional arrayHi Haris,
Your first solution with "blkConnected" and "blkNotConnected" is better than the second one. In order to have several sections displayed for block "blkNotConnected", you should try with parameter "several"
But you can improve the execution time by prepare you data for "blkConnected" and "blkNotConnected" in two other PHP arrays. |