How to write a preg_match_all just for grabbing one specific element?

Alice

New Member
Until the website give me an access to his API, i need to display only 2 things from this website : What i want to grab// Example on a live pageThose 2 things are contained in a div : \[code\]<div style="float: right; margin: 10px;">here what i want to display on my website</div>\[/code\]The problem is that i found an example on stackoverflow, but i never wrote preg_match before. How to do this with the data i want to grabb ? Thank you\[code\]<?php $html = file_get_contents($st_player_cv->getUrlEsl());preg_match_all( 'What do i need to write here ?', $html, $posts, // will contain the data PREG_SET_ORDER // formats data into an array of posts);foreach ($posts as $post) { $premium = $post[1]; $level = $post[2]; // do something with data}\[/code\]
 
Back
Top