.load function problem

.load function problem

hi there

i have jquery code as below

  1. jquery.js file
  2. $(document).ready(function(){
  3. $(ul#name).load('hello.php?val=0",function(){
  4. if(conditional statement)
  5. {

  6. //do something with li tag generated from hello.php
  7. }
  8. elseif(condition)
  9. {
  10. $(ul#name).load("hello.php?val=1",function(){
  11.                   do something with li tag generated from hello.php
  12.                   }
  13. }
  14. });
  15. });

  16. hello.php
  17. value=$_get['val'];
  18. for(loop)
  19. {
  20. echo '<li id=$i> $i </li>';
  21. }
i know i am doing mistake here . i just  want to change the value pass throu load like above which is not working
how to achive this


thanks