I have a PHP multidimensional array which will store information depending on parameters input.
Now as many times the loop runs, I want it the background div height to increase. The structure of HTML layout is as below:
for($i=0; $i < count($array); $i++)
{
<div id='outer div'> --------------------------background color rounded corner
for($j = 0; $j< $array[$i]; $i++)
{
<div id='inner div'>
contents
</div>
}
</div>
}
Please advice.
I know I should use javascript code like $(“#outer div”).height(), but how to pass this value to javascript?
Thanks a lot…
Mark and Krister,
Thanks for helping me out and telling me that I can use the inline way to set height. However your code had problem.
Instead of: height = $array[$i] * 10; This worked: height = count($array[$i]) * 10; // remember it was array of arrays (Multidimensional array).
You could use
inline csslike this: