Wants to get a text from source. (Text between 2 words)
-
Hi,
I want to get a specific word from the source-code
relevant source code is like this;
<div class="container_16 marginTB10px"> <div id="wow_backtoalldeals"> <div id="gobacktoindex" class="grid_15 alpha omega"> Looking for the full list of deals? <a href="/deals/home.jsp?atg.multisite.remap=false">Click here</a> to go back </div> <div class="clear"></div> </div> </div> <div class="clear"></div> </div> <!-- Deal item Block End --> </div> <div class="clear"></div> <div id="addToCartInputs"></div> <script type="text/javascript"> $(document).ready(function() { var endDate = "2014-06-06 00:00:00.0"; var endDay = new Date(getTimestamp(endDate)); $('#countDownTime').countdown({ until : endDay, format: 'dHM', layout: '{dnn} Day(s) {hnn} Hour(s) {mnn} Minute(s)? Remaining', expiryText: "Expired" }); }) var attrNames = ''; var attrValues = ''; var productId = 'prod1010042'; var skuId = ''; var qty = '15'; function getSkuAttributes(attrName,selectedIndex) { attrNames = ''; attrValues = ''; skuId = ''; $('select[id^=dealoptions]') .each( function(index) { console.log(index + ": " + $(this).val() + ' ' + $(this).attr('name')); if (index <= selectedIndex) { if (index == 0) { attrNames += $(this).attr( 'name'); attrValues += $(this).val(); } else { attrNames += '~' + $(this).attr( 'name'); attrValues += '~' + $(this).val(); } } }); callSkuContents(); }
From the above source code i want to get this 2014-06-06 00:00:00.0 part.
How can i do this?
I have done like this
———–$html2 = str_get_html($mysource);
$value = $html2->find(<<What needs to come here>>)————–
Looking forward for your responses
regards,
zerandib
- The topic ‘Wants to get a text from source. (Text between 2 words)’ is closed to new replies.