Now i am showing how to highlight keyword in content. User type keyword and highlight keyword in string. In php function you can easily highlight matched word as full keyword in search result
Now I am showing how to detect mobile device and redirect to mobile site. If you have created a mobile version of your website and computer (desktop/laptop) version of your website . You will need to be sure that you redirect your mobile visitors to your mobile website. For example if you have create 2 site example.com for desktop and m.example.com for mobile. if someone visits example.com on their mobile, you will need a way to redirect them to m.example.com.
I am going to show you how to json data in array. Use json_decode (json_decode($jsonData))funcation and By default, objects are converted to standard objects. When use TRUE (json_decode($jsonData, true)), returned objects will be converted into associative arrays.
Use parse_url function to get domain name and component, parse_url function returned associative array At least one element will be present within the array. Potential keys within this array are: scheme - host, port, user, pass, path, query - after the question mark ? , fragment - after the hashmark #