ohdang888 Posted March 24, 2008 Share Posted March 24, 2008 ok this is what i want to do... be able to put this is a form... <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="550" height="400"> <param name="movie" value="gamefile/tank2.swf"> <param name="quality" value="high"> <embed src="tank2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400"></embed> </object> And then my script would look for "width" and then take the number between the quotes..... It deosn't matter is there are 2 widths in code, it will always be the same..... Anyone know the direction to point me too???? Thanks! Link to comment https://forums.phpfreaks.com/topic/97558-grab-words-from-middle-of-scirpt/ Share on other sites More sharing options...
MadTechie Posted March 24, 2008 Share Posted March 24, 2008 try this <?php $data= 'some data width="100" blar'; if (preg_match('/width="(\d+)"/', $data, $regs)) { echo "Width = ".$regs[1]; }else{ echo "no width found"; } ?> Link to comment https://forums.phpfreaks.com/topic/97558-grab-words-from-middle-of-scirpt/#findComment-499156 Share on other sites More sharing options...
ohdang888 Posted March 24, 2008 Author Share Posted March 24, 2008 i <3 you. thanks dude! i've been stuck on that for hours! Link to comment https://forums.phpfreaks.com/topic/97558-grab-words-from-middle-of-scirpt/#findComment-499159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.