Guest User

Untitled

a guest
Jun 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <? foreach ($waiting_users as $waiting_user): ?>
  2.     <? echo $waiting_user->user_id; ?>
  3. <? endforeach; ?>
  4.  
  5. I need to define the user id in a javascript variable. What is the best way of doing something like this?
  6.  
  7. <script type="text/javascript">
  8.         var variable = "<? echo $waiting_user->user_id; ?>"; <-------------???
  9. </script>
Add Comment
Please, Sign In to add comment