Can I pass numbers as parameters in URL? I am trying to get the slug name as below,
$slug = $post->post_name;
$pagePath = site_url() . '/listing-details/?p=' . $slug;
and trying to get the slug as below,
$the_slug = $_GET['p'];
Now the issue here, in some cases I am getting the $slug value as something like
650-jefferson-ave
Thus finally my URL which I am getting, becomes:
http://localhost/project/listing-details/?p=650-jefferson-ave
Thus in that case my $the_$slug is returning null and this url is redirecting the default http://localhost/project/listing-details/ page without any parameters.
How can I achieve this? Please anyone help.
$in the variable namelist($id, $slug) = explode('-', $_GET['p'], 2);