Gracias por tu respuesta;
puse el siguiente codigo:
Código PHP:
<?php
$q=mysql_query("SELECT * FROM estudiantes ORDER BY Matricula DESC");
while($r=mysql_fetch_array($q)){
$valor[]=$r['Matricula'];
$rest=substr($valor, -6);
$sigue=max($valor);
$next=$sigue+1;
echo $next;
}
?>
y me arroja el siguiente error:
Código:
Warning: substr() expects parameter 1 to be string, array given in G:\XAMPP W7\xampp\htdocs\icp\test.php on line 21
1
Warning: substr() expects parameter 1 to be string, array given in G:\XAMPP W7\xampp\htdocs\icp\test.php on line 21
1
Warning: substr() expects parameter 1 to be string, array given in G:\XAMPP W7\xampp\htdocs\icp\test.php on line 21
1