Posted June 26 '09 at 01:33 AM
Posts: 782
hey just having fun, thought it would be cool to have a animated effect using php. like some steel doors opening
(im sure youve seen this before) by using the statement below to be used in a css position parameter. i have tried but fail to change the variable out in the same position, only echoing the full count or outside the loop it gives just the final. also failing to properly integrate the variable in the css. any thoughts ?
<?php
$num = -950 ; while($num < 0 ) { usleep(200); ++$num; echo $num; }
?>
<style>
#door { position: absolute; left: <?php echo $num; ?>px; }
</style>