shubham704 0 Posted May 4, 2020 Report Share Posted May 4, 2020 So I wants to take value from URL, I create simple PHP code for taking value from URL <?php if(isset($_POST["Search"])){ $url = $_POST["url"]; $value = (explode ('v=', $url)); $videoId = $value[1]; } ?> This for taking value from this https://www.youtube.com/watch?v=value url and echo somewhere, but wants to take value from https://www.youtu.be/value , this also, but how? , work with both URLs Quote Link to post Share on other sites
Ingolme 1,020 Posted May 4, 2020 Report Share Posted May 4, 2020 It will take a bit of time to learn, but this is a job well suited for regular expressions: https://www.php.net/preg_match http://www.regular-expressions.info/ Quote Link to post Share on other sites
Makwana Prahlad 1 Posted July 16, 2020 Report Share Posted July 16, 2020 Use the ampersand & to glue variables together: $url = "http://localhost/main.php?email=$email_address&event_id=$event_id"; // ^ start of vars ^next var Quote Link to post Share on other sites
Ingolme 1,020 Posted July 16, 2020 Report Share Posted July 16, 2020 9 hours ago, Makwana Prahlad said: Use the ampersand & to glue variables together: $url = "http://localhost/main.php?email=$email_address&event_id=$event_id"; // ^ start of vars ^next var I am not sure you even read the question. You consistently provide incorrect or irrelevant answers to questions. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.