mevdschee/php-crud-ui

Listing referenced texts

anushaath opened this issue · 1 comments

I want to show only certain values of certain columns if the field is referenced.

So after the if statement in line 92 I added another if statement like this:

https://github.com/mevdschee/php-crud-ui/blob/master/ui.php#L92

if ($i=='first_name' || $i=='last_name' || $i=='model' || $i=='reg_number'||$i=='pickup_location' || $i=='start_time')

This should ideally print "Firstname- Lastname" for one table.
But it prints nothing. The field is blank. I can't seem to figure it out.
If I remove the above if statement, it prints everything.
Any ideas?

Variable $i represents the column number, not the column name.

Use: $data[$subject]['columns'][$i]=='first_name'