tamouse mailing lists wrote in message
news:cahuc_t__sw-_yhrw4n4uqr-fa46+cebunzgehboaatrafla...@mail.gmail.com...
On Tue, May 29, 2012 at 2:52 AM, Tony Marston
t...@marston-home.demon.co.uk wrote:
On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:
A rule of thumb is no more than 50
On 03 Jun 2012 at 10:02, Tony Marston tonymars...@hotmail.com wrote:
tamouse mailing lists wrote in message
news:cahuc_t__sw-_yhrw4n4uqr-fa46+cebunzgehboaatrafla...@mail.gmail.com...
There is a point: if you are unfamiliar with code, wading through
screens and screens of a function to find
Tim Streater wrote in message news:d0.7c.45755.25a3b...@pb1.pair.com...
On 03 Jun 2012 at 10:02, Tony Marston tonymars...@hotmail.com wrote:
tamouse mailing lists wrote in message
news:cahuc_t__sw-_yhrw4n4uqr-fa46+cebunzgehboaatrafla...@mail.gmail.com...
There is a point: if you are
On Tue, May 29, 2012 at 2:52 AM, Tony Marston
t...@marston-home.demon.co.uk wrote:
On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:
A rule of thumb is no more than 50 lines per
function, most much less. Back in the day when we didn't have nifty
gui screens and an 24 line terminals
Ashley Sheridan a...@ashleysheridan.co.uk wrote in message
news:1338326229.2616.31.camel@localhost.localdomain...
On Tue, 2012-05-29 at 17:06 -0400, Paul M Foster wrote:
On Tue, May 29, 2012 at 08:52:46AM +0100, Tony Marston wrote:
On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:
Hi,
Just want to throw my 2 cent in :)
2012/5/30 Tony Marston t...@marston-home.demon.co.uk
Ashley Sheridan a...@ashleysheridan.co.uk wrote in message
news:1338326229.2616.31.camel@localhost.localdomain...
On Tue, 2012-05-29 at 17:06 -0400, Paul M Foster wrote:
On Tue, May 29, 2012 at
On Tue, May 29, 2012 at 11:40:25PM +0200, Matijn Woudt wrote:
[snip]
On Tue, May 29, 2012 at 11:06 PM, Paul M Foster pa...@quillandmouse.com
wrote:
[snip]
I think a lot of coders try to be kewler than the next 18 guys who are
gonna have to look at the code, so they use a lot of
Paul,
Are you stating here that compression is a bad thing?
That means you consider this nice:
if ( action == A )
{
doA();
}
else if (action == B )
{
doB();
}
else
{
doC();
}
Or perhaps flooded with comments that merely say the same as the code does?
I'd go
On Wed, May 30, 2012 at 04:31:12PM +0200, Sebastian Krebs wrote:
[snip]
If the functions were named properly you don't have to follow every
execution path to the deepest deep. Or do you reading PHPs C-source, just
because a wild substr() appeared? When you see a method loadFromFile()
and
-Original Message-
From: Paul M Foster [mailto:pa...@quillandmouse.com]
Sent: Wednesday, May 30, 2012 10:54 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Re: Function size
On Wed, May 30, 2012 at 04:31:12PM +0200, Sebastian Krebs wrote:
[snip]
If the functions were named
On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:
A rule of thumb is no more than 50 lines per
function, most much less. Back in the day when we didn't have nifty
gui screens and an 24 line terminals (yay green on black!), if a
function exceeded one printed page, it was deemed too
On Tue, May 29, 2012 at 08:52:46AM +0100, Tony Marston wrote:
On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:
A rule of thumb is no more than 50 lines per
function, most much less. Back in the day when we didn't have nifty
gui screens and an 24 line terminals (yay green on
On Tue, 2012-05-29 at 17:06 -0400, Paul M Foster wrote:
On Tue, May 29, 2012 at 08:52:46AM +0100, Tony Marston wrote:
On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:
A rule of thumb is no more than 50 lines per
function, most much less. Back in the day when we didn't have
On Tue, May 29, 2012 at 11:06 PM, Paul M Foster pa...@quillandmouse.com wrote:
OMG in alpha order?! At best, I might group them together by function
type, with some comment notation in the file. But not alpha order. I
prefer not to have forward declares in my files, so I generally
arrange
On May 24, 2012, at 4:48 PM, tamouse mailing lists wrote:
Yes, I think that is *exactly* the criterion-- not a mystery or an emergent
thing, really, was a pretty expicit reasoning--being able to see/scan the
entire function on one page (or now in one screenful) makes it much easier to
see
On May 23, 2012 9:14 AM, Tedd Sperling t...@sperling.com wrote:
Hi gang:
On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:
A rule of thumb is no more than 50 lines per
function, most much less. Back in the day when we didn't have nifty
gui screens and an 24 line terminals (yay
On Thu, 2012-05-24 at 15:48 -0500, tamouse mailing lists wrote:
On May 23, 2012 9:14 AM, Tedd Sperling t...@sperling.com wrote:
Hi gang:
On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:
A rule of thumb is no more than 50 lines per
function, most much less. Back in the day
Ron Piggott ron.pigg...@actsministries.org wrote in message
news:499A66F0FB394E1DB44F7E0C011CF11C@RonPiggottPC...
I need to access a FUNCTION I programmed within a different FUNCTION. Are
these able to be passed like a variable? Or are they able to become like a
$_SESSION variable in nature?
On Mon, Jun 21, 2010 at 10:49 AM, Pete Ford wrote:
On 21/06/10 00:45, Rick Pasotto wrote:
I think that's right - doesn't the manual describe this sort of thing about
using callback functions that are class members?
Yes.
Actually Stut pointed out that I was calling both dimmensions when my sorry
butt should only have been referencing the second one.
I had everything over expanded so I could see where the code was breaking.
Thank you everyone for the help! That was fantastic!
Frank
Frank Stanovcak [EMAIL
I'm sure I'm a pea-brain, but this caught my attention.
So you execute the fetchObjects() method which could return a large
number of objects, then you reference a method of the 0th one.
I didn't test, but why not use: $object-fetchObjects(0)-method();
Where fetchObjects($id) returns the object
Paul van Haren wrote:
OK guys, thanks for all your inputs.
Based on your guidance, I have tested the following code with a
series of variations:
class foobar {
function bar2 () {
echo Yep, in bar2() right now\n;
}
It seems to be a PHP Bug, because normaly it should very well.
but you can solve this problem, by a workarround.
using eval($a.();); instead of $a(); in the class.
Best regards
Sebastian
Paul van Haren [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Hi there,
I'm trying to
Thanks, this helps. The code now works.
In case this is truely a bug in PHP, where should I log it? Anything that
I should do to make sure that it gets followed up?
Regards, Paul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I think you should log it, because it seems to be, and you found this error.
Regard
Sebastian
Paul van Haren [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Thanks, this helps. The code now works.
In case this is truely a bug in PHP, where should I log it? Anything that
I
On 11/1/07, Sebastian Hopfe [EMAIL PROTECTED] wrote:
I think you should log it, because it seems to be, and you found this
error.
i would not consider this a bug.
what paul is asking about is the variable function syntax in php.
http://www.php.net/manual/en/functions.variable-functions.php
Sebastian Hopfe wrote:
I think you should log it, because it seems to be, and you found this
error.
it's not a bug - especially because nobody has bothered to mention the php
version.
I'm guessing that it's being run on a version php5, in which case the fatal
error
seems correct - you have a
On 11/1/07, Jochem Maas [EMAIL PROTECTED] wrote:
Sebastian Hopfe wrote:
I think you should log it, because it seems to be, and you found this
error.
it's not a bug - especially because nobody has bothered to mention the php
version.
this issue has the same implications in php4 and php5,
On Thu, 2007-11-01 at 16:10 +0100, Jochem Maas wrote:
I've completely lost track of the state of the exact OO rules in any
given version of php5)
Haha, you too eh!?
BTW, I finally bothered to download PHP 5.2.4 last night and checked it
out. This is the first time I've seen a speed improvement
Robert Cummings wrote:
On Thu, 2007-11-01 at 16:10 +0100, Jochem Maas wrote:
I've completely lost track of the state of the exact OO rules in any
given version of php5)
Haha, you too eh!?
BTW, I finally bothered to download PHP 5.2.4 last night and checked it
out. This is the first time
On Thu, 2007-11-01 at 17:16 +0100, Jochem Maas wrote:
Robert Cummings wrote:
On Thu, 2007-11-01 at 16:10 +0100, Jochem Maas wrote:
I've completely lost track of the state of the exact OO rules in any
given version of php5)
Haha, you too eh!?
BTW, I finally bothered to download PHP
OK guys, thanks for all your inputs.
Based on your guidance, I have tested the following code with a
series of variations:
class foobar {
function bar2 () {
echo Yep, in bar2() right now\n;
}
public function foo2
Ralph Kutschera escreveu:
Hallo!
I'm working on a project, where we distinguish between functions and
actions in design, although in PHP both are implemented as functions.
Is there a chance that PHP can use the word action as function?
E.g.:
public function doSomething() { }
public
Labunski wrote:
PHP does not support function overloading.
So, is there any other way of getting a number of parameters(variables)
passed to a function?
aka.
function fruits($apple, $banana, $kiwi, $grape){
#should (somehow) output 4
}
OK. if it was an array, than I could use
Hello,
on 10/24/2005 10:57 PM Etienne Finet said the following:
Can anyone give me a clue on how to change this script so it can be used
with basic SMTP authentication?
SMTP authentication is not that simple. There are several authentication
methods and you need to establish an
Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have someting like this:
$test = mysql_query(SELECT MAX(dato) AS datos FROM tabla WHERE campo_mes
= '$mes');
$test_m = mysql_fetch_array($test);
$test_mes = $test_m['datos'];
print $test_mes
where
Hi, thank you for your reply! I'll consider carefully this holes. Thank you!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Thank you for your reply!
I have changed the function like this:
function doReg($fname1=,$family1=,$company1=, $MOL1=, $dannum1=,
$bulstat1=, $phone1=, $email1=, $username1=, $password1=,
$payment1=, $maillist1=, $Addr1=, $City1=, $zipcode1=,
$Country1=, $shippingName1=, $shippingFamily1=,
If you were trying to use the result from mysql_pconnect() as the second
optional argument to mysql_query() in your function, be sure you declare
it 'global' inside the function.
Read PHP docs on variable scope if this is what tripped you up.
If not, I have no idea why the database is not
Hi Viktor,
Viktor Popov wrote:
Hi,
I'm trying to do the following but I don't have any success. Could you help
me here...
I have this code in mu page:
?php
include script/functions.php;
require 'script/common.inc';
$valid = TRUE;
if (isset ($_POST['submit'])) {
foreach($_POST as $key=$value) {
Matthias Bauw [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm having a problem with a php application;
I have two files: one is ccadduser wich adds users to a controlcenter
that I am currently designing for a website.
In that ccaduserfile I call for a function
On Saturday 04 September 2004 03:42 pm, Torsten Roehr wrote:
Matthias Bauw [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm having a problem with a php application;
I have two files: one is ccadduser wich adds users to a controlcenter
that I am currently designing for a
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I write this function to delete directory and file but when i 've a
directory not empty i get error
The code that i write is this:
I receive this warning:
Warning: rmdir(cartella): Directory not empty in
the checkpermission(); function should be run before php can pharse anything
farther down the script, try putting an exit; after the header() statement.
--
--
Jasper Howard :: Database Administration
Velocity7
1.530.470.9292
Juan Pablo Herrera [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi everybody,
I have a cuestion about the features on function mail. I think that it
send the email one to one address. Is it ok?.
Regards,
Juan Pablo
Hi Juan Pablo,
the manual says:
mail() automatically mails the
Found the solution:
function create_car($params){
global $smarty;
$car = new Car(Jeep sWrangler,black);
$smarty-register_object($params[id], $car);
}
Maris [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi there!
I am trying to make a PHP function create_object that would
No, because that's not a standard format.
You'll have to write your own function (as you've done).
If you're looking to store an array as a string, look at serialize()
Pete Forman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Is there a standard function that converts a string to
Take a look at phpclasses.org
Last week there also came another class especially made for backups aswell
if I recall.
--
--
Kim Steinhaug
--
There are 10 types of people when it comes to binary numbers:
those who understand
about GD, Warning: imagecreatefromjpeg():
'/var/www/html/datos/2004/02/crio25.jpg' is not a valid JPEG file. how can i
solve it please?
image pass the EOF and BOF test, so this is not the
problem :)
here you got the image with problems , i'm sorry
about the content of image...
Your likely to find many ways to do this and many functions with many
lines of code that do many variations of what you want. Can I use the
word many many more times?
Such is the way with programming.
Here's my take on it. Pull all your values into one long string:
$date_string =
Try this:
http://us4.php.net/checkdate
-Tom Reed
[EMAIL PROTECTED]
Chris Bruce [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello all,
I was going to build a function to check whether a selected date
exists, but thought that I would see if anyone has done this type of
thing already
If you're on Windows, you should see a file by the name of php_exif.dll
in your PHP\extensions directory. It should've come with the
distribution. Depending on the way your php.ini file is set up, you may
either leave this file in its current location, or you may need to copy
it to your
Thanks. I could have sworn I searched php.ini for exif. I had to do both
of the below to make it work.
Ben Ramsey wrote:
php.ini
[extension_dir = c:\PHP\extensions]
[uncomment]
extension=php_exif.dll
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
[EMAIL PROTECTED] wrote:
Hi all,
are in PHP, functions for crypt and decrypt string?
I would to use this function in my script in PHP, how can I use this?
I need of an example for use this and a list of this function.
Thanks in advance.
base64_decode() and base64_encode()
In article [EMAIL PROTECTED], [EMAIL PROTECTED]
says...
Hi List,
I have a self-made function that uses a MySql statement something like this:
Function MyFunc(){
sql = mysql_query(select * from table where somefield=\somevar\){
while(blah blah){
$var =blah blah;
}
}
return
Well... Definitly depends on what kind of function it is... However, instead
of echoing in a function, most ppl recommend echo do_it(), were do_it() is
function do_it()
{
return Hi;
}
There are many builtin functions without a return value, simply cause they
don't need to, or there's no real
Nevermind, I got it to work...
cheers
Jas wrote:
I call this function it checks a session variable then displays 1 of 3
menus... for some reason it will only display the first menu regardless
of the results of my decoded session var. Any help or just a new pair
of eyes would help. Thanks in
Please, see:
http://www.php.net/manual/en/function.localeconv.php
and
http://www.php.net/manual/en/function.setlocale.php
-
zerof
-
Joffrey Leevy [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]
The money_format function does not do it for me. Is there a simple php
Hi,
you have to use *ini_get* function and not *function_exists* because it
is a restriction on PHP.INI.
Try:
?
if (eregi('rmdir',ini_get('disable_functions')))
echo rmdir Function exists;
else
echo rmdir Function DOES NOT exists;
?
[]s
Pedro Faria.
On Fri, 21 Nov 2003 18:58:12
$payment = 1;
function payment(){
global $payment;
if ($payment == 0);
header (location:test_page.html);
}
global $payment;
elseif ($payment == 1) {
header (location:test_page2.html);
}
__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
Here is what Ihave
I am getting a elseif parse error. Is there something I'm
leaving out?
Frank
code
---
$payment = 1;
function payment(){
global $payment;
if ($payment == 0);
header (location:test_page.html);
}
global $payment;
elseif ($payment == 1) {
header
Remove the second 'global $payment;'. Regards.
-Gregory
-Original Message-
From: Frank Tudor [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 2:01 PM
To: 1PHP
Subject: [PHP] RE: function help redirect help
Here is what Ihave
I am getting a elseif parse error
Sorry I'm getting this error message
Parse error: parse error, unexpected T_ELSEIF
__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
--- Frank Tudor [EMAIL PROTECTED] wrote:
I am getting a elseif parse error.
Let me clean up your code a bit, and hopefully the error will stand out.
function payment()
{
global $payment;
if ($payment == '0');
header ('Location: http://example.org/test_page.html');
}
global
$payment = 1;
function payment(){
global $payment;
if ($payment == 0){
header (Location: test_page.html);
}
elseif ($payment == 1) {
header (Location: test_page2.html);
}
}
--
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using
I made the changes but I am getting:
Parse error: parse error, unexpected T_ELSEIF
I did take the second global statement out after I cut and
pasted your code and modified the urls
so now here is what it looks like (the whole thing).
Frank
?PHP
$payment = 1;
function payment()
{
--- Frank Tudor [EMAIL PROTECTED] wrote:
function payment()
{
global $payment;
if ($payment == '0');
header ('Location: http://ftudor/test/test_page.html');
}
elseif ($payment == '1')
{
header ('Location: http://ftudor/test/test_page2.html');
}
Your code looks
This one worked (kinda)
I have no more errors but it doesn't do the redirect (hmmm)??
So now here is what it looks like:
I am putting in the $payment=1; so it will automatically go to
test_page2.html but it just sits there.
Is there a headers thing already going on blocking this?
I know
--- Frank Tudor [EMAIL PROTECTED] wrote:
I am putting in the $payment=1; so it will automatically go to
test_page2.html but it just sits there.
[snip]
header ('Location: http://ftudor/test/test_page2.html');
What happens when you type it into your browser manually?
On Monday, October 27, 2003 11:26 AM, Frank Tudor wrote:
This one worked (kinda)
I have no more errors but it doesn't do the redirect (hmmm)??
?PHP
$payment = 1;
function payment(){
global $payment;
if ($payment == 0){
header ('Location: http://ftudor/test/test_page.html');
}
Can you see the problem(s) now? Never underestimate the benefits of
writing
clean code. :-)
Hehe, you should see my code..
function dp_neg($v1,$v2){
$neg = ((substr((string)$v1,0,1)==-)||((substr((string)$v2,0,1)==-)));
$bneg= ((substr((string)$v1,0,1)==-)((substr((string)$v2,0,1)==-)));
I get my ugly purple test page
:)
Frank
--- Chris Shiflett [EMAIL PROTECTED] wrote:
--- Frank Tudor [EMAIL PROTECTED] wrote:
I am putting in the $payment=1; so it will automatically
go to
test_page2.html but it just sits there.
[snip]
header ('Location:
Oh?!?!
Sweet! thanks... let me try that and get back to the group
:)
--- Pablo Gosse [EMAIL PROTECTED] wrote:
On Monday, October 27, 2003 11:26 AM, Frank Tudor wrote:
This one worked (kinda)
I have no more errors but it doesn't do the redirect
(hmmm)??
?PHP
$payment = 1;
Shit!
payment(); WORKS!
Thank for teach me how to do a function guys!!!
Frank
--- Frank Tudor [EMAIL PROTECTED] wrote:
Oh?!?!
Sweet! thanks... let me try that and get back to the group
:)
--- Pablo Gosse [EMAIL PROTECTED] wrote:
On Monday, October 27, 2003 11:26 AM, Frank
--- DvDmanDT [EMAIL PROTECTED] wrote:
Can you see the problem(s) now? Never underestimate the benefits of
writing clean code. :-)
Hehe, you should see my code..
Yes, very messy and disorganized. Is this an admission of guilt, a cry for
help, or what?
Chris
=
My Blog
Try:
somewhere global define :
$encryptiontechnique = 'ENCRYPT ALGORITHM';
function encryptPassword($password, $salt='') {
global $encryptiontechnique; if ($salt === '') { $salt =
$encryptiontechnique; }
// CODE..
}
Joel Colombo
Liam Gibbs [EMAIL PROTECTED] wrote in
Hi Erik,
You may want to re-investigate using nested functions for this purpose, it
seems a bit illogical. The main reason is that it clutters up the source.
If you want a private function, use docblock tag @access private to let
other users know that it should not be accessed directly, or wait
I'll try.
/* This function instantiates and returns a new Parent class. */
function createParent()
{
return new Parent;
}
/* $p is a reference of the Parent object created by createParent(). */
$p = createParent();
I believe the problem occurs here. $p becomes a reference to the
oh, some addendum, I would need it for MySQL if its dependend.
Thomas
On Mon, 16 Dec 2002 21:46:34 +0100 [EMAIL PROTECTED] (Thomas Seifert) wrote:
Hi folks,
I'm looking for a function or class which is able to automatically update
multiple tables.
The hard thing on this is, I only want
Nick Eby wrote:
true or false:
when declaring a function, a given argument can be declared to pass by
reference, or can be declared to have a default value, but never both.
i.e., you can only write one of:
function foo($param)
function foo($param = bar)
but never the equivalent of:
function
At 08:16 10.11.2002, conbud said:
[snip]
also I have the function wrong in my original question I have it as
function db_conn($host,$user,$pass,$dab)
{
$db = mysql_connect($host, $user,$pass
mysql_select_db($dab,$db);
}
and not
function
also I have the function wrong in my original question I have it as
function db_conn($host,$user,$pass,$dab)
{
$db = mysql_connect($host, $user,$pass
mysql_select_db($dab,$db);
}
and not
function db_conn($host,$user,$pass,$dab)
{
$db = mysql_connect($host, $user,$pass)mysql_select_db($dab,$db);
}
you need to return $db:
function db_conn($host,$user,$pass,$dab)
{
$db = mysql_connect($host, $user,$pass
mysql_select_db($dab,$db);
return $db;
}
and then use $db = db_conn(,,,);
or make it global:
function db_conn($host,$user,$pass,$dab)
{
blobal $db;
$db = mysql_connect($host, $user,$pass
huh I thought I tried that befoer and it didnt work but this time it worked
good, thanks everyone.
Also whats the difference between $globals['$variable'] and just global
-Lee
Maxim Maletsky [EMAIL PROTECTED] wrote in message
news:20021110082455.7C29.MAXIM;php.net...
you need to return $db:
First of all, you can't echo that variable in the manner you are trying.
Try this instead:
[lib.inc]
function test_func($param1) {
return $param1;
}
[main.php]
?php
// option 1
$num = test_func(123);
echo $num;
// option 2
echo test_func(123);
?
HTH
_
/ Joshua Minnie
You can only as an array:
function calculate_money($sum)
{
// some hanky panky calculations
$myArr[] = $type;
$myArr[] = $amount;
return $myArr;
}
or shorter:
function calculate_money($sum) { return array($type, $amount); }
Faisal Abdullah [EMAIL PROTECTED] wrote in message
It still works...try http://www.php.net/mysql or
http://www.php.net/fopen for example...
/lasso ([EMAIL PROTECTED])
Brian V Bonini wrote:
There used to be a utility that let you search php functions from the
address bar in your browser by simply appening PHP to the function name eg,
php
Nope, it was this http://www.php.net/tips.php that I was thiking of
But thanks, I didn't know you could do that ;-)
-Brian
-Original Message-
From: Lars Olsson [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 02, 2002 2:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Function
I have been looking around in the PHP function listing for a function that
can find or match one character from a string. I thought it would be
something like post_str() or something but never found anything close to
that. I get the idea of post and str from the SQL command. I did check the
Gaylen Fraley wrote:
I am in need of a function/script that will take a directory and search all
filenames, recursively down, for a given file. Can anyone point me to a
source? Thanks.
$result=`grep -r 'expression' ./`;
--
PHP General Mailing List (http://www.php.net/)
To
On Sunday 09 June 2002 17:17, Austin Marshall wrote:
Gaylen Fraley wrote:
I am in need of a function/script that will take a directory and search
all filenames, recursively down, for a given file. Can anyone point me
to a source? Thanks.
$result=`grep -r 'expression' ./`;
This
$result=`ls -R | grep 'expression' ./`;
HTH
Chris
Jason Wong wrote:
On Sunday 09 June 2002 17:17, Austin Marshall wrote:
Gaylen Fraley wrote:
I am in need of a function/script that will take a directory and search
all filenames, recursively down, for a given file. Can anyone point me
to a
This resricts to *nix and can be disallowed due to security constraints, but
thanks anyway. I just wrote my own PHP routine.
--
Gaylen
PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/
Chris Hewitt [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL
I have a script that switches.
switch($pid)
{
case 1:
break;
case 2:
break;
}
Now I'm doing a check in case 1 and if everything goes well, i want to
switch directly to case 2 while the script is runny.
How would i do that ???
Please don't post the same question
In article
[EMAIL PROTECTED],
[EMAIL PROTECTED] (Kris Vose) wrote:
Can you practice function over-loading in php?
Kris
No you cannot overload in PHP.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Can you practice function over-loading in php?
No you cannot overload in PHP.
You can achieve the same effect (having the same function do
something else in a different circumstance) by making
parameters optional:
?
Function functionName($param1, $param2 = )
{
...
}
?
Well, not in the procedural sense, but you can do method and property
overloading on objects. See http://php.net/overload
-Rasmus
On Sun, 12 May 2002, Smileyq wrote:
In article
[EMAIL PROTECTED],
[EMAIL PROTECTED] (Kris Vose) wrote:
Can you practice function over-loading in php?
On Sun, 12 May 2002, Smileyq wrote:
[EMAIL PROTECTED] (Kris Vose) wrote:
Can you practice function over-loading in php?
No you cannot overload in PHP.
In a particularly masochistic project, we achieved function overloading by
creating a global array $F that linked public to hidden names of
function custom_function()
{
if ($error == 0) {
return true;
} else {
return Error!;
}
}
if (custom_function() != Error!) {
echo Success;
} else {
echo Error;
}
Also, you could still return false on your custom_function(), if before
the return you
I think this is more along the lines of what was wanted :)
function custom_function()
{
if( $problem1 )
{
return 'Problem 1 occured!';
}
elseif( $problem2 )
{
return 'Problem 2 occured!';
}
elseif( ... )
{
...
}
return true;
}
if(
1 - 100 of 135 matches
Mail list logo