Hi , I want php code to search a piece of code which i made it available in an variable , and then echo around 40 words of text from the code starting point .
For Example , My code is stored in an variable as :
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta charset="utf-8" /><title>
Dotcabs
</title><meta name="viewport" content="width=device-width, height=device-height" /><link rel="stylesheet" href="css/style.css" /><link rel="stylesheet" href="css/responsive.css" />
<script src="js/jquery-1.11.1.js"></script>
<script src="js/script.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&sensor=false"></script>
<script src="js/places-search-box.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script src="js/jquery-ui-timepicker-addon.js"></script>
I want to find the word code.jquery and then echo the first 30 or More words from the matched term ,
Here in case, I need to search code.jquery , Its present in code so now , I want to echo this upto 50 or any characters of my choice:
code.jquery.com/ui/1.10.4/jquery-ui.js
Any help is appreciated !