Variable index in for() loop expression in php
Posted: 08 Feb 2017, 07:17
Dear admin i try for few hours to find out how i can get an id into my code
- $i = (0); the 0 is my problem but i getting errors
when i place: ($i = ('. $users['id'] .');
i tried also this code give also errors
& i tried this code gives also error:
I hope i`m understanble because my English
Code: Select all
<?php for($i = (0); $i<sizeof($i);$i++){ ?>
when i place: ($i = ('. $users['id'] .');
i tried also this code give also errors
Code: Select all
<?php for($i = ('. $users[id] .'); $i<sizeof($i);$i++){ ?>
Code: Select all
Notice: Use of undefined constant id - assumed 'id' in C:\xampp\htdocs\Rating\index1.php
Code: Select all
<?php for($i = ($users[id]); $i<sizeof($i);$i++){ ?>