@susan
To generate SEO-friendly URLs with PHP, you can follow these steps:
Here is an example of a PHP function that generates SEO-friendly URLs:
1 2 3 4 5 6 |
function generate_seo_url($string){ $string = preg_replace('/[^a-zA-Z0-9-_.]/', '-', $string); $string = strtolower(trim($string, '-')); $string = preg_replace('/-+/', '-', $string); return $string; } |
Note: This is just an example, you may need to modify the function to fit your specific needs.