Welcome Guest, Not a member yet? Register   Sign In
Problem to pass an argument to a function
#1

[eluser]Diegosf93[/eluser]
I have a problem to pass an argument to a function look i have this view file:

Code:
<table>
<tr>
<th>Nombre</th>
<th>Apellido</th>
<th>Empresa</th>
<th>Usuario</th>
<th>Password</th>
<th>-</th>
</tr>

&lt;?php foreach ($usuarios as $usuario): ?&gt;

<tr>

<td>&lt;?= $usuario->nombre ?&gt;</td>
<td>&lt;?= $usuario->apellido ?&gt;</td>
<td>&lt;?= $usuario->empresa ?&gt;</td>
<td>&lt;?= $usuario->usuario ?&gt;</td>
<td>&lt;?= $usuario->password ?&gt;</td>
<td>
&lt;?php echo anchor('Panel_Admin/Modify_Usuario', 'Modificar');
    echo "-";
    echo anchor('Panel_Admin/Eliminar_USuario', 'Borrar');?&gt;</td>
</tr>

&lt;?php endforeach;?&gt;



</table>

So i want to modify an user and call a function in the controller and i want to pass it the id of the user to load his information, but i dont know how to pass it to the function.
#2

[eluser]CroNiX[/eluser]
The user guide on Views covers that.
#3

[eluser]Diegosf93[/eluser]
Yes i see it, the problems was in the concatenation of the arguments, thanks!




Theme © iAndrew 2016 - Forum software by © MyBB