I know one can likely use the switch statement but I have this currently to check that all function parameters that are supposed to be an int are and if not show an error:
if(!is_int($chartWidth)){
echo "Chart width must be an integer";
}
if(!is_int($chartHeight)){
echo "Chart height must be an integer";
}
if(!is_int($gridTop)){
echo "Grid top must be an integer";
}
if(!is_int($gridLeft)){
echo "Grid left must be an integer";
}
Can this be coded any more efficiently or shorter?