DanielBP Posted September 12, 2011 Share Posted September 12, 2011 I made a script to grab the data between these tags on my page: <td class="numbers"> </td> It shows only the numbers and that's what I want (see Ex: ) but if I view the source code it shows this: Andreea - <td class="numbers">111</td><br /> Claudia - <td class="numbers">30</td><br /> Daniel - <td class="numbers">37</td><br /> Adela - <td class="numbers">4</td><br /> Is there a way to display the result without those tags ? Ex: Andreea - 111 Claudia - 30 ............ As you can see, I only need the numbers, there's nothing else inside those tags. Quote Link to comment https://forums.phpfreaks.com/topic/246946-exclude-tags/ Share on other sites More sharing options...
voip03 Posted September 12, 2011 Share Posted September 12, 2011 I am not sure what you are asking? can you plst the code in ina code tag. Quote Link to comment https://forums.phpfreaks.com/topic/246946-exclude-tags/#findComment-1268225 Share on other sites More sharing options...
aruns Posted September 12, 2011 Share Posted September 12, 2011 try using strip_tags Quote Link to comment https://forums.phpfreaks.com/topic/246946-exclude-tags/#findComment-1268227 Share on other sites More sharing options...
DanielBP Posted September 12, 2011 Author Share Posted September 12, 2011 try using strip_tags Thank you, it works Here's the code: foreach ($linkarray as $result) { echo "<h2>".$username."'s number - ".strip_tags($result)."</h2><br />"; } Is there a way to also sort the numbers ? Quote Link to comment https://forums.phpfreaks.com/topic/246946-exclude-tags/#findComment-1268230 Share on other sites More sharing options...
DanielBP Posted September 12, 2011 Author Share Posted September 12, 2011 Nvm I made it myself. Thank you again for your help, you can close this topic now Quote Link to comment https://forums.phpfreaks.com/topic/246946-exclude-tags/#findComment-1268302 Share on other sites More sharing options...
AyKay47 Posted September 12, 2011 Share Posted September 12, 2011 nevermind I made it myself. Thank you again for your help, you can close this topic now please mark as solved Quote Link to comment https://forums.phpfreaks.com/topic/246946-exclude-tags/#findComment-1268304 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.