<?php
//class change characters
class ChangeCharacters
{
private $allowed;
public function change_to($view)
{
$change=$view;
$matriz['á']="a";//Delete or add characters to be replaced.
$matriz['-']="";
$matriz['_']="";
$matriz[' ']="";
$view2=strtr($change,$matriz);
$this->allowed=$view2;
return $this->allowed;
}
public function go()
{
echo $this->allowed;
}
}
//example of how to apply
$info=new ChangeCharacters();
$info->change_to("Página_1 3");//Please insert here the characters to be changed.
$info->go();
?>