[eluser]Blaskunk[/eluser]
Hello world !!
I work on a website in codeigniter of course.
I search a method to print an error of a field of a form.
My fields is generate automatically with a buckle for like that:
for($i=1;$i<$num_dest;$i++)
echo "<input id='field".$i."'>";
Of course, the rules and fields sets are corrects.
Only the write errors don't work.
The version of my codeigniter used only allow me to use this syntax:
$this->validation->field_error;
Obviously, i can't use $this->validation->field$i_error;
I find this syntax but isn't work :
$objectName = 'this'; //case sensitive.
$anotherObject = 'validation';//case sensitive
$functionName = 'field'.$i;
echo $$objectName->{$anotherObject}->{$functionName}();
Would come out the right syntax to do that ?
Please help, thank's in advance
PS : sorry for my grammar' errors.