Re: [PHP] Changing permissions

2003-10-19 Thread zavaboy
How do I run my installer as root?

Eugene Lee [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Sat, Oct 18, 2003 at 10:28:49PM -0400, zavaboy wrote:
 :
 : Ok, I have a installer that only works if the directory that's being
 : installed to has public writing permissions. I tried chmod() on the
 : directory, but I get a error. How can I make it so my installer can
 : write in a directory with the incorrect writing permissions?

 You can't.  That's what permissions are designed to do.

 If you can't even chmod the directory, then the directory probably
 doesn't belong to you.  You can't install your stuff into a directory
 that isn't owned by you (or at least in the same group as you).

 Otherwise, if it's your system, run your installer as root.

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



[PHP] Changing permissions

2003-10-18 Thread zavaboy
Ok, I have a installer that only works if the directory that's being
installed to has public writing permissions. I tried chmod() on the
directory, but I get a error. How can I make it so my installer can write in
a directory with the incorrect writing permissions?

Thanks!

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com

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



[PHP] Getting the FULL path

2003-10-02 Thread zavaboy
How do I get my FULL path... I made a web-based installer and it uses a
path.

Ok, my path to where I need it is:
/home/jimbug/public_html/zavaboy/phptest/ZML

Using dirname():
/phptest/ZML

Why is that?
How can I get PHP to output '/home/jimbug/public_html/zavaboy/phptest/ZML'
automatically?

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com

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



Re: [PHP] Getting the FULL path

2003-10-02 Thread zavaboy
Ok, thanks!
$_SERVER['DOCUMENT_ROOT'].dirname($PHP_SELF)
was just what I wanted!

J Morton [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 $_SERVER['SCRIPT_FILENAME'] or $_SERVER['DOCUMENT_ROOT']

 Justin

 zavaboy wrote:

  How do I get my FULL path... I made a web-based installer and it uses a
  path.
 
  Ok, my path to where I need it is:
  /home/jimbug/public_html/zavaboy/phptest/ZML
 
  Using dirname():
  /phptest/ZML
 
  Why is that?
  How can I get PHP to output
'/home/jimbug/public_html/zavaboy/phptest/ZML'
  automatically?
 
  --
 
  - Zavaboy
  [EMAIL PROTECTED]
  www.zavaboy.com
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

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



[PHP] Can I run scripts on server?

2003-09-23 Thread zavaboy
Is there a way to have a PHP script run on the server? For example, I want
to run a script to erase old database fields at 12:00 AM server time without
any user interaction, how would I do that?

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com

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



Re: [PHP] Can I run scripts on server?

2003-09-23 Thread zavaboy
Ok, thanks!

Leif K-Brooks [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 zavaboy wrote:

 Is there a way to have a PHP script run on the server? For example, I
want
 to run a script to erase old database fields at 12:00 AM server time
without
 any user interaction, how would I do that?
 
 All PHP scripts are run on the server, I'm guessing you mean run
 /automatically/ on the server. You're looking for cron on a *nix server.

 -- 
 The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.

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



Re: [PHP] Setting execution time for a loop

2003-09-10 Thread zavaboy
// Ok, I have a loop:
for ($i = $Date; $i = $sDate; $i--)

// Somthing like this is inside the loop:
if ($Exists)
 echo Something here.;
else
 $sDate--;

I have it check if it exists, if it doesn't, then it reduces $sDate by 1.
$sDate is initially 3 to 31 days less than $Date.
By reducing $sDate by 1, it keeps looking, what if there are no more?
It keeps going until I reach 30 seconds, how can I set a time limit?

I have it on: http://zavaboy.jimbug.org/phptest/blog.php
Go to May 14, 2003 wait 30 seconds for the page to load and you'll see what
I mean.
I don't want it to last 30 seconds and a error, I want 3 seconds max and no
error.


Curt Zirzow [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 * Thus wrote zavaboy ([EMAIL PROTECTED]):
  How do I set execution time for a for() loop?
  Like I have a loop stop once it finds 3 things, but what happens when
there
  are only 2 things? It keeps looking for 30 seconds then shows this
error:
  Fatal error: Maximum execution time of 30 seconds exceeded in...
 
  How can I set it to 3 seconds without a error?

 What you explained seems that you're doing something wrong... can
 you provide a small example of what you want to get done?



 Curt
 -- 
 I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] Setting execution time for a loop

2003-09-10 Thread zavaboy
if I wait untill $sDate is zero, it'll be in 2000.
I have $Date based on the current date, like to day is: 03252
03 is the year 252 is the day of the year.

Mike Ford [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On 10 September 2003 11:26, zavaboy contributed these pearls of wisdom:

  // Ok, I have a loop:
  for ($i = $Date; $i = $sDate; $i--)
 
  // Somthing like this is inside the loop:
  if ($Exists)
   echo Something here.;
  else
   $sDate--;
 
  I have it check if it exists, if it doesn't, then it reduces
  $sDate by 1. $sDate is initially 3 to 31 days less than $Date.
  By reducing $sDate by 1, it keeps looking, what if there are
  no more? It keeps going until I reach 30 seconds, how can I
  set a time limit?

 No need to set a time limit for this -- just set a limit on how far $sDate
 can be decremented.  Presumably only positive values are invalid, so just
 stop the loop when $sDate goes =0 -- either

 for ($i = $Date; $i = $sDate  $sDate  0; $i--)

 or something like:

 for ($i = $Date; $i = $sDate; $i--):

   if ($Exists):
 echo Something here.;
   else:
 $sDate--;
 if ($sDate=0):
   // do any necessary tidying up here -- e.g. set a
   // flag to say the loop was exited via the side door
   break;   // escape from the for loop
 endif;
   endif;

 endfor;
 // break escapes to here

 Cheers!

 Mike

 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

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



Re: [PHP] Setting execution time for a loop

2003-09-10 Thread zavaboy
Ok, I may be a little bad at telling people what exactly I want.
Probably I should try and figure this out for myself, I'm good at that! :D

Mike Ford [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On 10 September 2003 12:14, zavaboy contributed these pearls of wisdom:

  if I wait untill $sDate is zero, it'll be in 2000.
  I have $Date based on the current date, like to day is: 03252
  03 is the year 252 is the day of the year.

 So for goodness' sake just choose a sensible value to limit the loop -- I
 was just taking a stab in the dark from your mention of max 31 days'
 difference to guess it was a day-number within a month, and hence my
 assumption that only +ve values would be valid.

 You really haven't given us very much to go on here -- it might be easier
to
 suggest a solution if you told us more about what *exactly* it is you're
 trying to do.  And a little bit more of your *actual* code (not something
 like) might help things along, too.
 
  Mike Ford [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
  On 10 September 2003 11:26, zavaboy contributed these pearls
  of wisdom:
 
  // Ok, I have a loop:
  for ($i = $Date; $i = $sDate; $i--)
 
  // Somthing like this is inside the loop:
  if ($Exists)
   echo Something here.;
  else
   $sDate--;
 
  I have it check if it exists, if it doesn't, then it reduces
  $sDate by 1. $sDate is initially 3 to 31 days less than
  $Date. By reducing $sDate by 1, it keeps looking, what if
  there are no more? It keeps going until I reach 30 seconds,
  how can I set a time limit?
 
  No need to set a time limit for this -- just set a limit on
  how far $sDate can be decremented.  Presumably only positive
  values are invalid, so just stop the loop when $sDate goes
  =0 -- either
 
  for ($i = $Date; $i = $sDate  $sDate  0; $i--)
 
  or something like:
 
  for ($i = $Date; $i = $sDate; $i--):
 
if ($Exists):
  echo Something here.;
else:
  $sDate--;
  if ($sDate=0):
// do any necessary tidying up here -- e.g. set a
// flag to say the loop was exited via the side door
break;   // escape from the for loop
  endif;
endif;
 
  endfor;
  // break escapes to here
 
  Cheers!
 
  Mike

 Cheers!

 Mike

 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

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



[PHP] Setting execution time for a loop

2003-09-09 Thread zavaboy
How do I set execution time for a for() loop?
Like I have a loop stop once it finds 3 things, but what happens when there
are only 2 things? It keeps looking for 30 seconds then shows this error:
Fatal error: Maximum execution time of 30 seconds exceeded in...

How can I set it to 3 seconds without a error?

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com

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



[PHP] Re: maillist php manger/interface

2003-09-09 Thread zavaboy
I have been thinking on developing one for some time now.
I can make one for free for you, I also have a friend that wants one too.
It may take me a week or two, when do you need it?

If you're willing to wait 3 weeks max, I can make it for free.
I can even put it in your site if you want.
I'm going to work on it now so incase you want it.
I will not have power on the 10th or 11th due to electrical work.

I'll tell you what, you email me for anything regarding this project.
My email: [EMAIL PROTECTED]


Vasiliy Boulytchev [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Ladies and Gents,
I need the following:

1.  A online place for people to subscribe to mailing list.
2.  A online place to unsibscribe from a mailing list.
3.  Several admins for different mailing lists.
4.  mysql integration.

What do you guys use?  Any free software out there?  I have reviewed
about a dozen, ready to pay for one.  No time to develop.

Vasiliy Boulytchev

Colorado Information Technologies Inc.

(719) 473-2800 x15

http://coinfotech.com/

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



[PHP] Removing empty array values.

2003-08-18 Thread zavaboy
How do I remove empty array values?

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



[PHP] A long float number.

2003-08-01 Thread zavaboy
How do I prevent a long float number end up like this after/during a
calculation?

8.5E-05  //A number error occurs.

I even tried keeping the whole calculation in 1 line:

//Get the weight (in pounds) of a O-Ring.
$N = round((0.03613 * 1.85 * ((pow(pi(), 2) * pow(($iDia[$d] - $oDia[$d]),
2) * ($iDia[$d] + $oDia[$d])) / 32)), 6);

Thanks in advance!

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



[PHP] Re: A long float number.

2003-08-01 Thread zavaboy
Thanks! number_format() fixed it!

Bogdan Stancescu [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Keeping it on one line doesn't affect the calculations (as it
 shouldn't). Try using either sprintf() or number_format() for this
 purpose (the latter is generally preferred, but I don't know exactlt
 what you're after).

 Bogdan




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



[PHP] Changing numbers

2003-07-21 Thread zavaboy
I have the following numbers:

12.400
666.75
23
369.2
3.234

How can I make them have at least 2 decimal places?
So, they will output:

12.40
666.75
23.00
269.20
3.234

Thanks in advance!

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



Re: [PHP] Changing numbers

2003-07-21 Thread zavaboy
What about if I had 2.856 that function will make it 2.86.


Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
How can I make them have at least 2 decimal places?
[/snip]

RTFM at http://www.php.net/number_format

HTH!



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



Re: [PHP] Changing numbers

2003-07-21 Thread zavaboy
*Sigh*, lets say I have:

2.65
3.3
5.2670
12.030

I would like it at least 2 decimal places.. So, 5.2670 would be 5.267 not
5.27:

2.65
3.30
5.267
12.03

James Rodenkirch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 try rounding it first

 http://www.php.net/manual/en/function.round.php

 Zavaboy wrote:

  What about if I had 2.856 that function will make it 2.86.
 
 
  Jay Blanchard [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
  [snip]
  How can I make them have at least 2 decimal places?
  [/snip]
 
  RTFM at http://www.php.net/number_format
 
  HTH!
 
 




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



[PHP] A MySQL question

2003-07-14 Thread zavaboy
Ok, I want to delete only 1 row off of a database table...
Example:
I have a table with columns user and item...
Lets say the table contains the following rows (user | item):
582-668243 | Toothbrush
582-668243 | Toothbrush
582-668243 | Toothbrush
582-668243 | Trash can
582-668243 | Trash can
582-668243 | Something else
582-668243 | Something else
582-668243 | Something else
582-668243 | Something else
720-387690 | Dog treats
720-387690 | Car
720-387690 | Car
720-387690 | Toothbrush
720-387690 | Toothbrush

Ok, user 582-668243 is buying a lot, eh? LoL
Anyway, how can I remove only 1 Toothbrush from user 582-668243?
I just want the query... I've been trying to find it out for a few hours
now...

Thanks in advance!

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



Re: [PHP] A MySQL question

2003-07-14 Thread zavaboy
Ok, I added a primary key. I figured it out and I have it working... Thanks!

Chris Shiflett [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 --- zavaboy [EMAIL PROTECTED] wrote:
  Lets say the table contains the following rows (user | item):
  582-668243 | Toothbrush
  582-668243 | Toothbrush
  582-668243 | Toothbrush
 ...
  Anyway, how can I remove only 1 Toothbrush from user 582-668243?

 With the information you provided, you can't. You should never have
multiple
 rows in the database that are non-unique, and this is one reason why. You
need
 a primary key.

  I just want the query

 You should rather spend your time learning some database fundamentals
rather
 than asking this list (not a database list, in fact) for spoon-fed
answers. You
 will appreciate the knowledge more than the answer.

 Chris

 =
 Become a better Web developer with the HTTP Developer's Handbook
 http://httphandbook.org/



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



[PHP] Turning string into a table

2003-07-13 Thread zavaboy
Is there a way to make for example:

// (Column info)
// String 1:
[This column holds
[Col 1]
[Col 2]]
[This second column holds
[Col 3]
[Col 4]]

// (Row)
// String 2:
[Col 1 (row1)]
[Col 2 (row1)]
[Col 3 (row1)]
[Col 4 (row1)]

// (Row)
// String 3:
[Col 1 (row2)]
[Col 2 (row2)]
[Col 3 (row2)]
[Col 4 (row2)]

// How do I turn the above strings into a table?
// Like this:

table
tr
td colspan=2This column holds/td
td colspan=2This second column holds/td
/tr
tr
tdCol 1/td
tdCol 2/td
tdCol 3/td
tdCol 4/td
/tr
tr
tdCol 1 (row 1)/td
tdCol 2 (row 1)/td
tdCol 3 (row 1)/td
tdCol 4 (row 1)/td
/tr
tr
tdCol 1 (row 2)/td
tdCol 2 (row 2)/td
tdCol 3 (row 2)/td
tdCol 4 (row 2)/td
/tr
/table

You get the idea...
So, any idea how to do that?
I want it to work correctly no matter how many rows and columns there are.

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



[PHP] mySQL: Rows and columns

2003-06-18 Thread zavaboy
I know this is more of a mySQL question but, how do I delete and add rows
and columns?

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



[PHP] How do I delete a mySQL table?

2003-06-16 Thread zavaboy
How do I delete a mySQL table? (Just what's in the subject)

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



Re: [PHP] How do I delete a mySQL table?

2003-06-16 Thread zavaboy
Thanks!


David Nicholson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello,


This is a reply to an e-mail that you wrote on Mon, 16 Jun 2003 at 22:22,
lines prefixed by '' were originally written by you.
 How do I delete a mySQL table? (Just what's in the subject)
 - Zavaboy
 [EMAIL PROTECTED]
 www.zavaboy.com

Connect to the mysql server, select the db then use:
mysql_query(DROP TABLE table_name);

David.

-- 
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

  Professional Web Development by David Nicholson
http://www.djnicholson.com/

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/
(developed entirley in PHP)



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



[PHP] Text file breaking!

2003-06-05 Thread zavaboy
Ok, I don't get it... I put a string to one line ( $string =
str_replace(\n, br, $string); ) but when I put it in a text file I see
breaks right before br. For example:

I have a text area and type:
1
22
333

then, I take that string and replace \n with br.
$string = str_replace(\n, br, $string);

then, I put the string in a txt file...
and here's what I see in the text file:
1
br22
br333

instead of:
1br22br333

How can I make it that way?
Thanks in advance!

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



[PHP] Re: Text file breaking!

2003-06-05 Thread zavaboy
Thanks! :)


Bobby Patel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 try this
 $string = ereg_replace ('\r\n|\n|\r', 'br', $string);
 OR
 $string = nl2br($string);

 NOTE: for me the first case will remove the newline, whereas the second
will
 keep them (It might be becuase of my old php version [4.06]?)


 Zavaboy [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Ok, I don't get it... I put a string to one line ( $string =
  str_replace(\n, br, $string); ) but when I put it in a text file I
 see
  breaks right before br. For example:
 
  I have a text area and type:
  1
  22
  333
 
  then, I take that string and replace \n with br.
  $string = str_replace(\n, br, $string);
 
  then, I put the string in a txt file...
  and here's what I see in the text file:
  1
  br22
  br333
 
  instead of:
  1br22br333
 
  How can I make it that way?
  Thanks in advance!
 
  --
 
  - Zavaboy
  [EMAIL PROTECTED]
  www.zavaboy.com
 
 





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



[PHP] UBB to HTML

2003-06-02 Thread zavaboy
How can I strip ALL HTML tags, then turn UBB code to HTML. And I also want
to know how to turn the HTML back to UBB?



- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



Re: [PHP] Help with eval()

2003-05-30 Thread zavaboy
Umm, have you tested it? It didn't work for me...


Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 for ($i = $aNum; eval ('return $i ' . $do . ' $bNum'); )



 zavaboy wrote:

 Hey,
 
 I'm having problems with the eval() function...
 
 if ($Sort == Up) {
 $do==;
 } else {
 $do==;
 }
 for ($i = $aNum; eval ('$i ' . $do . ' $bNum'); )
 //So.. the above line acts like:
 //for ($i = $aNum; $i = $bNum; )
 //...or...
 //for ($i = $aNum; $i = $bNum; )
 {
 i
 if ($Sort == Up) {
 $i++;
 } else {
 $i--
 }
 
 Any idea how to make it work right?
 
 
 
 - Zavaboy
 [EMAIL PROTECTED]
 www.zavaboy.com
 
 
 
 
 




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



Re: [PHP] Help with eval()

2003-05-30 Thread zavaboy
I get a infinite loop and parse error, unexpected $...


David Grant [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 zavaboy wrote:

  Umm, have you tested it? It didn't work for me...
 
 
  Marek Kilimajer [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 
 for ($i = $aNum; eval ('return $i ' . $do . ' $bNum'); )

 Untested:

 for ($i = $aNum; eval(return (\$i  . $do .   \$bNum););)


 -- 
 David Grant
 Web Developer

 [EMAIL PROTECTED]
 http://www.wiredmedia.co.uk

 Tel: 0117 930 4365, Fax: 0870 169 7625

 Wired Media Ltd
 Registered Office: 43 Royal Park, Bristol, BS8 3AN
 Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD

 Company registration number: 4016744

 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.

 **




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



Re: [PHP] Help with eval()

2003-05-30 Thread zavaboy
Ok, it works now! Thanks!
Go visit what I'm working on at: http://zavaboy.jimbug.org/phptest/blog.php
I'm working on a blog, mainly for myself...
If you go there, tell me if the yellow days are clickable. Also tell me if
you see red dates on the blog.
I should be the only one to see those things because the PHP looks for a
matching IP.

Thanks again!


Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 yes, missing semi-comma:
 for ($i = $aNum; eval ('return $i ' . $do . ' $bNum;'); )

 the rest is up to you, I don't know what you want to do whit it

 Marek Kilimajer wrote:

  for ($i = $aNum; eval ('return $i ' . $do . ' $bNum'); )
 
 
 
  zavaboy wrote:
 
  Hey,
 
  I'm having problems with the eval() function...
 
  if ($Sort == Up) {
  $do==;
  } else {
  $do==;
  }
  for ($i = $aNum; eval ('$i ' . $do . ' $bNum'); )
  //So.. the above line acts like:
  //for ($i = $aNum; $i = $bNum; )
  //...or...
  //for ($i = $aNum; $i = $bNum; )
  {
  i
  if ($Sort == Up) {
  $i++;
  } else {
  $i--
  }
 
  Any idea how to make it work right?
 
 
 
  - Zavaboy
  [EMAIL PROTECTED]
  www.zavaboy.com
 
 
 
 
 
 
 




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



[PHP] Help with eval()

2003-05-29 Thread zavaboy
Hey,

I'm having problems with the eval() function...

if ($Sort == Up) {
$do==;
} else {
$do==;
}
for ($i = $aNum; eval ('$i ' . $do . ' $bNum'); )
//So.. the above line acts like:
//for ($i = $aNum; $i = $bNum; )
//...or...
//for ($i = $aNum; $i = $bNum; )
{
i
if ($Sort == Up) {
$i++;
} else {
$i--
}

Any idea how to make it work right?



- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



Re: [PHP] breaking up a string (every N chars)

2003-05-27 Thread zavaboy
Thanks! That helped! I didn't need the trim though... It brought my project
together, better!


Evan Nemerson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 php.net/chunk_split
 php.net/explode

 explode(\r\n, trim(chunk_split($String, 3, \r\n)));


 On Monday 26 May 2003 06:16 pm, zavaboy wrote:
  Hi, How can I break a string every N (eg: 3) characters?
 
  //Suppose I have a string...
  $String = 001102203304405;
  //Now, how do I break this string every 3 characters?
  //So...
  $String[0] = 001;
  $String[1] = 102;
  $String[2] = 203;
  $String[3] = 304;
  $String[4] = 405;
 
  Thanks in advance!





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