How can we extract string 'techinterviews.com' from a string
'http://www.techinterviews.com' using regular expression in PHP?
Answers were Sorted based on User's Feedback
Answer / rajeev raj karn
$url="http://www.techinterviews.com";
$url_part=split("w{1,3}[\.]",$url);
echo $url_part[1];
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ram
$url = "http://www.techinterviews.com";
$splittedstring = explode ("www.",$url );
$str = $splittedstring[1];
echo $str ;
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sunil kumar
echo
strstr("http://www.techinterviews.com","techinterviews.com");
| Is This Answer Correct ? | 8 Yes | 9 No |
How do I stop php artisan serve in windows?
What are the disadvantages of php?
Is time a dependent variable?
What is namespaces in PHP?
What is env in laravel?
how can i disable multiple user in the same password in my website using any scripts
how to open & closing opening period in fico
What does trim () do in javascript?
What is php session_start() and session_destroy() function?
Describe the differences between the object models in PHP 4 and PHP 5.
i have designed a registration form in html (registration.html) and to insert user details in database i have designed a submit form in php (submit_registration.php) but when i click on submit button in registration.html it opens a dialogue box which asks for open or save php(submit_registration.php) even though i have already installed apache HTTP server and php version 5 on my computer and i am using mysql as backend. plz suggest me what should i do????
What is the difference between get and post in php?