On Mon, Jun 05, 2006 at 08:42:18AM +1000, Voytek Eymont wrote: > I'm trying to insert some text into a php file, the text is enclosed in ' ' > > I'd like to include a word with an "'s" like "individual's permission" > what the proper way to do this ? (change the outer ' ' to " " ?)
I'd definitely consider changing the quotes, but you can escape a quote with a backslash, so 'individual\'s permission' will work. But it's better to go double quotes, because otherwise (especially in a long string like that) you'll edit the text, add another apostrophe, forget to quote it, and everything will explode again. A separate but related issue is that of the wisdom of defining long chunks of HTML inside of PHP, when there's a perfectly valid method of escaping from PHP and going back to good ol' dump-out-the-text mode, but I've given up even trying to win that war with PHP programmers. BTW, we have a coders list now if you want to help to populate it's archives: http://lists.slug.org.au/listinfo/coders - Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
