Re: [PHP] Holy Moly...
Well, this *is* a good list, but the subjects tend to be of a more "intermediate" nature .. You gotta know a little before you know what to ask. I would reccomend staying subscribed and just skimming subject headings for things topics that sound interesting to you. It's surprisingly easy to get a running start with PHP using some of the web tutorials out there. a few: http://www.phpbeginner.com/ http://www.devshed.com/Server_Side/PHP/ http://www.phpwizard.com/beginning.html http://www.phpbuilder.com/columns/ those are just from a quick google search, so ypu can easily fins others. another GREAT source is the PHP manual itself - especially the user comments. http://www.php.net/manual/en/ ahoy and enjoy --kevin On Wed, 2 Jan 2002, Julie Hull wrote: > Could someone please direct a total novice to the best PHP beginner news > group. Just to many to choose from ~:) > > Thank You, > Julie ~:) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Using html-style tags to define a variable
I recall seeing a thread along these lines previously, but the search functionality at lists.php.net is currently offline, and try as I might to save messages that may prove useful to me in the future, I cannot get them all. So I apologize that this may be found elsewhere, or may be rehash for most of you. That given, I'm looking for the ability (using regex, i'm sure) to put something like booger into a database (via a form), and have it translate to $foo="booger" when php sucks it back out. the eventual use of this will allow me to type something like: that's very tenacious of you ... and have the end output be ereg_replaced (or such) to: that's very http://www.m-w.com/cgi-bin/dictionary?va=tenacious>tenacious of you ... so i need to take whatever is within the tag, define that as $word, and then replace the whole string (tags and word) with: http://www.m-w.com/cgi-bin/dictionary?va=$word>$word follow me? a simple answer will do, or a point towards an appropriate turorial may serve me better in the long run thanks in advance --kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] hello and a question
Hi. I just joined the list and, of course, I have a question. I've searched for quite a bit of time now, but to no avail.. mostly, I suspect, because all the relevant search terms are to broad. But heres my problem: I have a journal I whipped up and tweak often that uses PHP and MySQL (no small club there. :p ). The functionality I'm trying to add right now is to be able to enclose text in a tag (what? you didnt see that "hide"? html and email just don't mix) and it will not be displayed in the browser. example: I had a good day today. I shot the milkman. Tho nothign much happened. then i use: $entry_hidden = eregi_replace(".+","",$entry); and this works just fine, replacing the "secret" text with a non-displayed tag. The problem arises when I use the tag 2 or more times: Hey losers! I think that I do not like corn. in this case, the above blurb gets outputted as: hey like corn. So how do I make it stop pattern-matching when it reaches the first instance of , and make it work properly for each subsequent set of the tag? This is prolly something pretty basic in regular expressions, but in my limited working knowledge (and the 3 tutorials I've tried), it's not addressed. searches in the archive, the php manual, and google have also failed me. worthy list? I thank you in advance and hope I can tolerate the mail volume long enough to return the favor. --kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: hello and a question
yay. this preg business methinks needs some more looking into. ;) everywhere I've looked theres always one or 2 people proselytizing its greatness. my late-night "boredom" reading of O'Reilly's _Perl_ (sans computer or pause) left little behind little information in my head, not surprisingly. Thanks much, sir. --kevin On 21 Aug 2001 [EMAIL PROTECTED] wrote: > Kevin Keeler <[EMAIL PROTECTED]> wrote: > > $entry_hidden = eregi_replace(".+","",$entry); > > try: $entry_hidden = preg_replace("|.+?|i","",$entry); > > ".+" is 'greedy', meaning it consumes as much as text as it can. with > perl-like regular expressions, you can add a trailing "?" which makes > the + and * operators non-greedy. > > jim > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] wildcard redirecting
Sorry, I couldn't think of a well-worded, descriptive title for what I'm trying to do. As I believe I mentioned before, I use PHP and MySQL to keep a journal. all the entries are accessed by /index.phtml?id=23 , where "23" is replaced by the id of the entry you want. A "problem" I'm having is that some search engines' spiders (google, most notably), won't navigate through all the different ?id= variants, even though they are all linked together. The solution I thought of would be to make /23.phtml point to the same location, by parsing the id out of the url. Then the spiders would crawl through all the individual pages and store them all. I got this to work just fine. Now what I would like is, rather than creating 100+ files (even if all they contain is an include(); ), to ake a way where any /n.phtml brings up the same batch of code. really te only soltion I could come up with was to change my ErrorDocument in .htaccess to point a 404 to a custom page in the directory, containing the url parsing code, or, if it detects a non-numeric file, display a default 404 message. The problem with that was that apache would actually redirect the browser, and the URL would be replaced with /404.phtml, losing the variable/ url. Also $http_referrer would be suspiciously blank. Anyone know a way I can succeed at the above? Or, even more delightful, a better way to achieve it? thanks --kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] <-- to check airfares
has anyone seen a script that checks a travel site (such as travelovity or expedia or even yahoo) and sucks out the relevant prices for certina destinations? If not, I'm thinking I could do it, but I was just wondering if anyone had an opinion on which site would be the simplest and "cleanest" to extract the data from? --kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]