Re: [PHP-DB] Re: Subject: screen resolution!

2006-02-05 Thread Jan Bailleul

I suggest you use JavaScript rather than PHP, because when using server side
scripts, you most probably need to use functions/variables out of the
Document Object Model (DOM).

When you use JavaScript, no extra trafic is generated on the
network/internet, and that isn't even necessary!

Specificaly, use the javascript variables
"document.body.clientWidth|clientHeight", inside a JavaScript. When these 
variables, that represent the number of pixels of the browser-window, are 
read, then you can draw anything to the screen that fits into these values 
of pixels. You don't need separate css-stylesheets or tables, as mentioned 
by the other posters in this thread!


E.g.


(I allready posted this message, but it was only sent to JeRRy. Oops!) - Original Message - From: "Neil Smith [MVP, Digital media]" <[EMAIL PROTECTED]> To: Sent: Sunday, February 05, 2006 7:17 PM Subject: [PHP-DB] Re: Subject: screen resolution! At 08:41 05/02/2006, you wrote: Message-ID: <[EMAIL PROTECTED]> Date: Sun, 5 Feb 2006 02:44:19 +1100 (EST) From: JeRRy <[EMAIL PROTECTED]> To: php-db@lists.php.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-733704850-1139067859=:48594" Content-Transfer-Encoding: 8bit Subject: screen resolution! Hi, I have written a website in PHP using MYSQL. But I have come accross an un-common problem. Normally when I create a website it's done on a desktop PC. But this time for the first time I did it on laptop meaning the screen resolution is different. Is there any sort of script/code I can use to create another section of my site in a desired screen resolution without me having to do it all manually? I would really recommend that screen size / resolution detection is no longer the way forward. It's perfectly possible to use CSS +/- XHTML correctly to have the page reflow without all the stylesheet switching hacks that would be required in the 'old school' (read : 1999) way of doing things. You'd need to use structural markup rather than try to 'force to fit' with tables etc, but it's entirely possible to generate flexible layouts that can display on any device, even a PDA, without screen size detection. Search engines like sematic layout too, and your menu for example may not be the first thing they or a screen reader encounters in the page - though it may *appear* at the top of the page due to CSS telling it where to be displayed. Here are some links for you to consider : all are worth reading and digesting from end to end. http://glish.com/css/8.asp http://www.alistapart.com/stories/journey/ http://www.positioniseverything.net/articles/onetruelayout/ http://www.csszengarden.com/ I know of many scripts online that I can DETERMINE visitors screen resolutions and recommend the ** Assuming javascript is turned on, or even the display device supports that detection. And bear in mind, many users *may not wish* to have their browser maximised just to view your site. HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] ECHO $variable


You can as well add a backslash BEFORE the "

eg. echo "text \"more text\" ";

So that will return this: 
   text "more text"
- Original Message - 
From: "Bastien Koert" <[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>; 
Sent: Sunday, October 08, 2006 3:35 PM
Subject: RE: [PHP-DB] ECHO $variable


easist way is to wrap the entire value in single quotes not double 
quotes...kinda breaks the rules but it will work..the other option is to 
search your value and do a replace on the double quotes


bastien



From: "Ron Piggott (PHP)" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: PHP DB 
Subject: [PHP-DB] ECHO $variable
Date: Sun, 08 Oct 2006 01:32:13 -0400

In one of my scripts I have



where

$saved_message_title is 1 Peter 5:7 "Cast all your cares on Him for He
cares about you"
--- note the "

When this is displayed on the screen it reads

1 Peter 5:7

I am assuming the " closes the value=

How may I echo this to the screen and have the full text be displayed,
not just 1 Peter 5:7 ?

Ron


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php