substr_replace command usage
substr_replace($string ,"",-1);
substr_replace($string ,"",-1);
$string="1,2,3,4,5";
$array=array_map('intval', explode(',', $string));
$array = implode("','",$array);
$query=mysqli_query($conn, "SELECT name FROM users WHERE id IN ('".$array."')");
NB: the syntax is:
SELECT * FROM table WHERE column IN('value1','value2','value3')
https://stackoverflow.com/questions/20203063/mysql-where-id-is-in-array
<!DOCTYPE html>
<html>
<head>
<style>
div.a {
line-height: normal;
}
div.b {
line-height: 1.6;
}
div.c {
line-height: 80%;
}
div.d {
line-height: 200%;
}
</style>
</head>
<body>
<h1>The line-height Property</h1>
<h2>line-height: normal (default):</h2>
<div class="a">This is a paragraph with a standard line-height.<br>
The standard line height in most browsers is about 110% to 120%.</div>
<h2>line-height: 1.6 (recommended):</h2>
<div class="b">This is a paragraph with the recommended line-height.<br>
The line height is here set to 1.6. This is a unitless value;<br>
meaning that the line height will be relative to the font size.</div>
<h2>line-height: 80%:</h2>
<div class="c">This is a paragraph with a smaller line-height.<br>
The line height is here set to 80%.</div>
<h2>line-height: 200%:</h2>
<div class="d">This is a paragraph with a bigger line-height.<br>
The line height is here set to 200%.</div>
</body>
</html>
$con=mysqli_connect("127.0.0.1","root","");//conexión
mysqli_set_charset($con, 'utf8'); //linea a colocar tambien puede ser latin1