On Thu, 16 Sep 2004 14:54:34 -0700, revDAVE <[EMAIL PROTECTED]> wrote:
> How can I use a PHP variable as the destination for a link?
>
>
> go here
>
> With var...? How do I write this?
>
> go here
--
Greg Donald
http://gdconsultants.com/
http://destiney
ch of PHP-CLI scripts which open other helper PHP-CLI
> scripts which may be called together or apart (so includes don't work)
> cat first.php second.php third.php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
> ./first.php
I am first.php
I am second.php
I am third.php
--
ay
(
[x] => 1
)
Array
(
[x] => 1
)
--
Greg Donald
http://gdconsultants.com/
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
+
| 2004-01-01 | 3 | 2. |
| 2004-01-02 | 4 | 2.5000 |
| 2004-01-03 | 4 | 3.5000 |
+----+---+-+
3 rows in set (0.01 sec)
--
Greg Donald
http://gdconsultants.com/
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> >http://www.morningstarcom.net/hosting.php
Need sunglasses to view the t50.com graphics. Heh.
--
Greg Donald
http://gdconsultants.com/
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nt(number) | avg(number) |
+---+-+
|18 | 2.3889 |
+---+-+
1 row in set (0.00 sec)
--
Greg Donald
http://gdconsultants.com/
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ossibilities in the manner you say.
You obviously know what's best Sam.. Good luck.
--
Greg Donald
http://gdconsultants.com/
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> a class would make it alot easier.
>
> Does anybody know such a project or something similar?
> I just want to avoid writing to much SQL
http://pear.php.net/package/DB_QueryTool
--
Greg Donald
http://gdconsultants.com/
http://destiney.com/
--
PHP General Mailing List (http://w
syntax
> errors, they will be displayed but this just doesn't seem to do
> anything.
Are you supplying it with fonts? The last time I installed JPGraph it
required Arial and Arial Bold at least.
Does your PHP install support the GD library?
--
Greg Donald
http://gdconsultant
$upload_file) {
> $db = mysql_connect("localhost","usr","pwd");
> mysql_select_db("imsafm",$db);
> $date = date("m-d-Y, D, H:i");
> $trauma = 'imsafm/$PHP_login/$img1_name';
Variables inside single quotes don't get evaluat
works all right.
> Has anyone experienced this before? Did I just misconfigure something?
This may be of some help:
http://httpd.apache.org/docs/mod/mod_dir.html
--
Greg Donald
http://gdconsultants.com/
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubs
rewall for a couple of games that aren't available otherwise.
Other than that I find the Windows OS a very risky venture, especially
when it comes to server applications. Microsoft has proven time and
time again they are fairly incapable of being secure. That may change
in the future
orks) is that PHP
> makes the key the same as the value if the key isn't specified. But is this
> actually correct Or is there something "going on" that I don't know
> about ???
Yes, that is what's happening, a simple test shows this:
#!/usr/bin/php
outpu
works. If it doesn't then post some error messages and
code for what's being tried and failing.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 14 Sep 2004 17:51:00 +0200, Diana Castillo <[EMAIL PROTECTED]> wrote:
> Anyone know of any function to replace letters with accents with just the
> regular letter, for instance replace á with a,
> ç with c, ñ with n ?
str_replace(), eregi_replace()
--
Greg Donald
http
x27;s like 3 or 4
of us at least. :)
Check out netcraft.com, they seem to be the defacto standard for stuff
like this.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ful php source
code again.
Thanks to all you guys for checking.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/
"the Fedora Project is for developers and high-tech enthusiasts using
Linux in non-critical computing environments."
Sorry, I don't mean to offend.. but I see no reason to help report and
fix RedHat bugs for free when they no longer offer us a free public
distro that isn't bleedi
f you have other suggestions, please tell us!
I'd suggest searching freshmeat.net for "php whois". Chances are
others have already invented a good wheel we can use.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
wnloaded a couple months back looks fine but the live site
seems broken.
TIA..
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
A couple years ago when upgrading some web servers we found RedHat 7
had this issue, strtotime() basically didn't work and always returned
-1 on 'negative' unix timestamps. I have never used Fedora but it's
probably the same issue all over again. I know this isn'
)) Then
> messages = "Bad filename"
> filename = ""
> WhichAction = 0
> End If
I'd use a regular expression so as to match all those symbols with one
command. Check out eregi() or maybe strstr().
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
}
}
class Obj {
var $x = 1;
function Obj(){}
}
$o = new Obj();
$a = array(1, 2, 3);
bindArray($a, $o);
print_r($o);
?>
Produces:
obj Object
(
[x] => 1
[0] => 1
[1] => 2
[2] => 3
)
You may want to prefix your key names with some text however. :)
--
Gre
uot;.
Can you change it back before you decode it? Maybe with str_replace() ?
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
die("bindArray() failed: array expected");
foreach($array as $k => $v){
$obj->$k = $array[$k];
}
}
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, 13 Sep 2004 08:04:41 -0700 (PDT), Dan McCullough
<[EMAIL PROTECTED]> wrote:
> $sql = "SELECT dealer.dealerid as ddealerid, dealer.company as company, dealer.name
> as name,
> dealer.surname as surname, dealer.email as email, dealer.contactday as contactday,
> orders.orderid
> as oorderid
es
unicode, so you may wanna check out the multi-byte string functions:
http://www.php.net/manual/en/ref.mbstring.php
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
y want
to do a LEFT JOIN with the relevant field.
SELECT *
FROM dealer
LEFT JOIN orders
ON dealer.dealerid = order.dealerid
WHERE order.status = '10'
GROUP BY dealer.dealerid
or something like that.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/
characters "+", quotes, etc.
> The form post data with "GET" method. And then I can't get correctly posted
> data in my PHP script. How to "unescape" data with PHP?
>
> Can someone help me ?
stripslashes() perhaps?
--
Greg Donald
http://destiney.com
a
> semi-colon ";" and will see the problem immediately.
So save yourself a lot of time and get a colorful editor like vim or
editplus or something.. :)
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
. Overall it's long-winded and the
humor is dry. Tons of useless chatter in between the information you
really want.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
while().
What database are you using? What do your tables look like? Where's
the code you've written already if any?
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.php.net/sqlite
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
less and
less all the time.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
up for that. If
> anyone can provide information on building custom functions and calls
> into PHP it would be helpful.
Did you try Google'ng for 'extending PHP'. I found lots of stuff just now.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http
>
>
> Output:
> Parse error: parse error, unexpected '(', expecting ',' or ';' in
> /srv/www/htdocs/stundenplan/stpoo.php on line 4
Did you try
var $input2 = array_pad($this->input, 10, 1);
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thu, 2004-09-09 at 15:25, Jim Grill wrote:
> exec("stty -icanon min 0 time 0");
Nice.
I suspect 'phpSnake' will appear on freshmeat in a couple days.
:)
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ring in PHP.
You may find ncurses_getch() of use however.
http://www.php.net/ncurses_getch
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
riendly for all.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, 2004-09-08 at 14:01, Pahlevanzadeh Mohsen wrote:
> Dears,
> I need to create user for MySQL.
> Please guide me..
http://dev.mysql.com/doc/mysql/en/Adding_users.html
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
can create JOINs between MyISAM tables? Maybe I need to do some more
> research into table types?
Yes, more research.
Maybe you're confusing relational with transactional.
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, 2004-09-08 at 13:15, blackwater dev wrote:
> Does anyone have a nice clean way to provide data grids with php short
> of simply creating a bunch of input boxes or using flash?
What is a 'data grid' ?
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/
und it's not possible to do a header rewrite with
> postfix either.
Add a "From:" header in the optional last field of your mail() call.
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ther servers.
I had to work on a client machine running some kind of windows ftp
server a few months ago, and I had very similar issues. Random
unexplainable breakages when downloading lots of files. I know this
doesn't help your current issue, but I thought I would share my
experience.
PHP, I mean if that's what
you want to code it in and stuff. I haven't ever seen any private
messenger tutorials though, probably a little too specific, I dunno..
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ion_destroy().
> D/ How is it possible, using PHP4+ sessions, to cancel a session a page is opened
> with, and starting a new session?
session_destroy();
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 2004-09-03 at 12:46, BOOT wrote:
> Does anyone have a script that can be used to call linux's locate command
> and display the results in a browser?
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
x27;s that?
Learn to use print_r(), it will recursively print all the variables in
your arrays and such. For example to debug this situation you can do
something like:
echo '';
print_r($POST);
echo '';
and you'll see $POST is empty cause you typo'd it, it's $_POST not
if that's what you want
and all.
Also, you might want to check with your web host that ".htaccess" is an
allowed override filename and that they allow overrides, it looks like
it is from you described. Long story short, you appear to be all set.
--
Greg Donald
--
PHP General Mai
ed at using substr but if the user leaves out the 'www.' then
> substr($_SERVER['HTTP_HOST'], 4) would return 'main.com', is there a better
> function to use in this instance?
str_replace()
You can replace the www. with an empty string.
--
Greg Donald
-
of these a couple years
back it was in the spec that the page would not reload.
In addition, a single select costs less than multiple selects with where
clauses.
Good luck.. however you decide to code it.
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ect options with one query, then create
new javascript Option objects for each. Then populate the select fields
based on the previous select field's selection.
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ack they will go to your intermittent page just after the form, not the
form page itself.
3) Use a header() call to send the user to a totally new page after the
POST.
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RL right off hand but the US post office releases a
new zip code database every year. It's a little flat file you can stick
in a database to query against.
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> work. I have even tried copying a known-good php.ini from another server
> and the same behavior exists. I am running IIS in Windows 2000. Any ideas?
Is your error_reporting turned up too high for the quality of the code?
http://www.php.net/error_reporting
--
Greg Donald
--
PHP Gener
t($mails);
for($i=0; $i<$count; $i++){
}
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
;s a list serve, and especially since I'm not the
poster of the original question.
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_globals", FALSE);
> but it still doesn't work.
> On php.net manual I can find WHAT I have to do and reasons but not HOW.
Make an .htaccess file:
php_flag register_globals off
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If someone could
> clarify that'd be great.
>
> -Andrew
If you just want to see if mail() works try it.
If it doesn't work then your mail setup is not working. Setting up an
SMTP server has nothing to do with PHP. Google will probably help you
if that's your issue
ve query caching, and so do most file systems. There are also PHP
caching tools like TurkeMM Cache and Zend that cache byte code only.
I'd bench it both ways and then decide based on the queries, the
development environment, and the cache timeout limitations/requirements.
--
Greg Donal
config? What should I be looking for. Oh!
Looks like you currently have no gd support for the PHP image related functions. Try
loading the gd extension in your php.ini.
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t also ask them if
they have any specific PHP functions disabled.
--
Greg Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r the downloads dir and
> also the file...rwxr-xr-x for both.
>
> Anyone have any idea why this isnt working?
Is the download directory outside a chroot'd web setup perhaps? Or
maybe your provider has some security you don't know about?
There are some file related fun
ble status like 'table_name';
size = Data_length + Index_length
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 3 Aug 2004 10:39:42 -0500 (EST), Amanda Hemmerich
<[EMAIL PROTECTED]> wrote:
> I need a solid foundation on using PEAR. ANy books or websites you
> would recommend?
You might try http://pear.php.net/
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http:/
he kit, simply unzip it and open the file "README.txt" to
get started." on:
http://www.google.com/apis/download.html
Plus you can search the web for free sample PHP scripts people made
for use with the Google API.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (
this sort of query.
http://www.google.com/apis/index.html
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ably already setting some kind of
userID or userName, so make that a session variable if it is not
already. Then it's just a matter of listing the userNames or userIDs
out of the userSessions table.
You might want to force session garbage collection at the top of each
script by calling sessionGarbageCollection(). That will make the
username listings more realtime.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
:
> function input($type,$size,$name,$value)
> {
> return ">>
> name=\"$name\">";
> }
function input($type,$size,$name,$value)
{
return <<
EOF;
}
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/stdout', 'w');
fwrite($stdout, "status message goes here\r\n");
Why would you want to print tags in a console? The console isn't
HTML aware. You probably just want \r\n as line delimiters.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to just make suggestions for general code improvement.
>
> So, where else might I find people that are willing to give general
> reviews of code?
Release it on Freshmeat.net. The reviews (and bug reports) will arrive shortly.
You can also do all sorts of developer networking on Sourcef
On Wed, 23 Jun 2004 00:47:23 -0500, Brent Clements
<[EMAIL PROTECTED]> wrote:
>
> How do I add linefeeds every few words?
php.net/wordwrap
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
y or object
> in /var/www/html/list.php on line 236
>
> Warning: Variable passed to each() is not an array or object in
> /var/www/html/list.php on line 237
>
> What am I doing wrong?
foreach($names as $key => $names){
You are reusing the same variable, $names is being overwritten.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and
> the program executes. The include_path has "." folder in it.
>
> What could possibly be the problem with executing the program from the /www
> folder?
Make the include call to db_mysql.inc a full path. Cron isn't aware
of much at all as far as system paths. ../ won
> } else {
>echo "action asked for is not specified";
> }
> } else {
> echo "action is not specified";
> }
> ?>
Looks like it would work to me. You might try function_exists() to
help track down the problem. Probably a typo or mispelled function
name.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
y but I find I rarely need it
as I usually already know the field names and the primary keys of all
my tables.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ache server was distributed with that. People seem
to be doing all sorts of things with PHP lately.
I've made a couple little php-gtk apps, it's pretty simple and the run
really fast too.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To
to do that.
It handles regular form variables as well as arrays.
So if your form had an array of checkboxes coming in via $_POST for
example, it will handle it.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ng a test message can
get you practically beheaded on some lists, lkml for example.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sset($_POST) ? array_map("slashes", $_POST) : array();
$_COOKIE = isset($_COOKIE) ? array_map("slashes", $_COOKIE) : array();
}
function slashes($var){
if(is_array($var))
return array_map("slashes", $var);
else
return addslashes($var);
}
--
Gre
27;re using. Mine are in
/var/log/apache for example.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 15 Jun 2004 19:21:39 -0400, Michael Lauzon <[EMAIL PROTECTED]> wrote:
> I am just testing, so that I can create a filter.
Or a label rather?
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
testing php
> out there. Thanks for any pointers, ideas, advice or help you may
have.
You can use assert() for simple debugging.
http://php.net/assert
There's also PHPUnit2 for bigger stuff.
http://pear.php.net/package/PHPUnit2
--
Greg Donald
http://destiney.com/
--
PHP Genera
ows about all your CONSTANTS, but
eval() doesn't.
I made this little function so I could use defined CONSTANTS in HTML
templates that get eval()'d.
function makeConstants() {
foreach(get_defined_constants() as $k=>$v) $GLOBALS[$k] = $v;
}
--
Greg Donald
[EMAIL PROTECTED]
--
PH
at looks like:
instead of the desired
Any ideas? I've google'd, and read lots of docs today trying to figure
it out but I don't know what else to try.
TIA.
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
be down near that
> time. Without causing too many if statements what is the best way to do
> this ?
Get another server, setup replication, and do backups off the slave,
virtually no downtime then.
Otherwise make a site-down page and cron it's swap out schedule with your
backups schedule.
stserve was for PHP discussion, not bogging up everyone's
mailbox with uninteresting bits.
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
be
> mistaken and there may still be someone out there using 900baud. ;)
You missed the point. But that's ok, I fixed the issue on my end.
:0
* ^From:.*kegworks.com.*
/dev/null
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
rowser.
A buddy of mine created a secure sessions tutorial that protects against
this exact issue. He has a fantasy stocks site and needed to protect
against session hijacking.
http://tutorials.dotgeek.org/tutorial.php?action=view&id=58
--
Greg Donald
[EMAIL PROTECTED]
--
PHP Gener
Richard Davey wrote:
Passing a potentially huge string through a replacement function for
every single page doesn't really = efficient in my shop. YMMV.
We use Turke MMCache so it's not every single page.
Besides that CPUs are way cheaper than bandwidth.
--
Greg Donald
[EMAIL PROTECT
On Thursday 15 April 2004 01:38 pm, John W. Holmes wrote:
> Certainly don't need to fire up the regex engine.
>
> return str_replace(array("\r","\n","\t"),'',$html);
Sweet, didn't know you pass it an array. Thx!
--
Greg Donald
[EMAIL P
bout it :) There is no
> "right or wrong", it's down to personal preferences.
Well at my shop more efficient = right and less efficient = wrong.
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
long time without any issues.
View my efficient single line of html source code: http://destiney.com/.
All the styles and javascript work fine. HTML parsers don't give a rats ass
about newlines, tabs, and carriage returns so why have them.. Makes the
output easier to compress as well.
--
G
On Thursday 15 April 2004 12:21 pm, Jorge Oliveira wrote:
> I use spaces for php code and tabs for html.
And the point of doing that is?
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t;, "", $return);
> > }
>
> Not to be too pedantic, but you could probably reduce the above
> to a single line function:
>
> function cleanFinalOutput($html){
> return eregi_replace("\n", "", eregi_replace("\r", "",
> ere
s would mean additional processing and
> replacements seems to be resources consuming sometimes...
Works for me. Feel free to not use it.
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and carriage returns. It
does not remove space characters. Your example seems to be the dangerous
one.
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> or
>
> echo str_repeat( "\t", 5 );
Remove all whitespace from the final HTML, then all this doesn't matter.
function cleanFinalOutput($html){
$return = eregi_replace("\n", "", $html);
$return = eregi_replace("\r", "", $r
that would add more functionality to it if possible...
Why reinvent the wheel?
http://pear.php.net/packages.php?catpid=7&catname=Database
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brian V Bonini wrote:
| Kind of funny... Back before PHP had sessions this was how everyone did
| it and everyone wished for session support in PHP, now that it's had it
| for a while :)
I hear ya. I recall a job interview in like 1999 or something
801 - 900 of 1003 matches
Mail list logo