• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Help: Formatting HTML with PHP

Anarchonixx

[H]ard|Gawd
Joined
Nov 6, 2002
Messages
1,524
First of all, I don't know PHP well enough to write complex stuff, but I can generally understand PHP code when I see it. I know very basic stuff such as declaring variables, using includes, and basic interaction with MySQL databases, and I understand concepts of arrays, etc, from my basic C++ knowledge. I'm just looking for a nudge in the right direction (functions to use, and the like) or an example to help me with what I'm trying to do.

I have a page where I'm including a chunk of HTML from another page. It's just various news items that already contain HTML tags. I was wondering if it was possible by relatively easy means to edit the tags out, and format the text as I wish.

EDIT: I realize it's relatively easy to bastardize the HTML tags and beat them into submission via CSS, but that's not really an option I want to consider.~

Thanks beforehand.
 
what i've used in the past are regular expressions. unfortunately they aren't exactly the easiest thing to understandthe first time around.

http://us2.php.net/pcre
 
thanks guys, both links were very helpful. Not only did I find a way to do what I was looking for (still needs some work, but I'm almost there), but also realized it's time to take some time to learn PHP properly instead of half-assing it and just learning the chunks I need when I need them.
 
You might also want to try using XML and the expat library (or whatever you prefer..) instead of html for storing and retrieving news data and the like.
 
Back
Top