or double quotes (if you want variables named
inside
the string to be interpolated). read up on php strings here:
http://php.net/string
He's probably using MS-Word to write code... those look very similar to
dumb-quotes. Have you notice they open with a superscript 3 and close
The following code works:
?php
$image = ³²;
if ($image == NULL) {
print ³False!²;
}else{
print ³$var²;
}
?
However, this does not:
?php
$image = ³²;
if ($image == NULL) {
print ³False!²;
}else{
print ³img
do you notice the totally weird string delimiters in your original post?
using either single quotes or double quotes (if you want variables named inside
the string to be interpolated). read up on php strings here:
http://php.net/string
Steve Marquez wrote:
The following code works
your syntax is broken because of the weird quotes it seems.
I agree. After replacing all the superscripted 2's and 3's with proper
quotes, the examples both work as expected.
JM
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 2007-06-05 at 19:57 +0200, Jochem Maas wrote:
do you notice the totally weird string delimiters in your original post?
using either single quotes or double quotes (if you want variables named
inside
the string to be interpolated). read up on php strings here:
http://php.net
On Tuesday 05 June 2007 10:50:15 Steve Marquez wrote:
It seems that if I add a string, rather than just the variable, then does
not work. I am getting an unexpected T_IS_EQUAL error.
Your string delimiters are very strange; I'm not sure if your code has those
in it or not, so I can't really
On Tue, 2007-06-05 at 11:04 -0700, Richard S. Crawford wrote:
On Tuesday 05 June 2007 10:50:15 Steve Marquez wrote:
It seems that if I add a string, rather than just the variable, then does
not work. I am getting an unexpected T_IS_EQUAL error.
Your string delimiters are very strange; I'm
Thank you.
I tried what you suggested below and it gave me an unexpected
T_CONSTANT_ESCAPED_STRING error.
Would this be valid: (I am typing in my Entourage, but I am writing the code
in Dreamweaver. You are probably seeing the quotes that Entourage (my email
application) is giving you.)
?php
Robert Cummings wrote:
On Tue, 2007-06-05 at 19:57 +0200, Jochem Maas wrote:
do you notice the totally weird string delimiters in your original post?
using either single quotes or double quotes (if you want variables named
inside
the string to be interpolated). read up on php strings here
Pastor Steve wrote:
Thank you.
I tried what you suggested below and it gave me an unexpected
T_CONSTANT_ESCAPED_STRING error.
Would this be valid: (I am typing in my Entourage, but I am writing the code
in Dreamweaver.
get a real text editor before you go mad.
textpad or ultraedit or
string delimiters in your original post?
using either single quotes or double quotes (if you want variables named
inside
the string to be interpolated). read up on php strings here:
http://php.net/string
He's probably using MS-Word to write code... those look very similar to
dumb
Pastor Steve wrote:
Thank you.
I tried what you suggested below and it gave me an unexpected
T_CONSTANT_ESCAPED_STRING error.
Would this be valid: (I am typing in my Entourage, but I am writing the code
in Dreamweaver. You are probably seeing the quotes that Entourage (my email
It would really help if you didn't use funky characters for quote that
aren't quote in your email.
It would help even more if you copy/paste your actual script.
On Tue, June 5, 2007 12:50 pm, Steve Marquez wrote:
The following code works:
?php
$image = ³²;
if ($image == NULL) {
In the following snippet, I'm trying to open and read a URL into the
variable $contents.
I'd like to use preg_replace() to return only part of that string beginning
with say - regional and ending with new - but I get the complete URL string
returned.
Thank you for any assistance.
Tony Ritter
* Thus wrote Anthony Ritter ([EMAIL PROTECTED]):
In the following snippet, I'm trying to open and read a URL into the
variable $contents.
I'd like to use preg_replace() to return only part of that string beginning
with say - regional and ending with new - but I get the complete URL string
Curt Zirzow wrote in message:
This exact thing was talked about earlier today, with the subject
'Using eregi_replace()'.
Right.
However, I've tried using the following code in which the text from the URL
is printed out completely and then I change the variable from
* Thus wrote Anthony Ritter ([EMAIL PROTECTED]):
Curt Zirzow wrote in message:
This exact thing was talked about earlier today, with the subject
'Using eregi_replace()'.
Right.
However, I've tried using the following code in which the text from the URL
is
Curt Zirzow writes:
I did some testing you can see the code and results here:
http://zirzow.dyndns.org/html/php/tests/preg/parse_doc.php
..
Thanks Curt.
I checked it out and I still pick up the following lines which I was looking
to delete on the pattern match.
They are:
Hi guys,
I have 2 strings
$a1=1,8,98,244,9,243,2,6,36,3,111,;
$a2=8,98,244,9,243,2,1,6,36,3,111,;
How can I exactly match 1, in both strings using one regular expression?
(first 1 is the first element and second time in a random position)?
Thanks,
Radu
--
PHP General Mailing List
$a1=1,8,98,244,9,243,2,6,36,3,111,;
$a2=8,98,244,9,243,2,1,6,36,3,111,;
How can I exactly match 1, in both strings using one regular expression?
(first 1 is the first element and second time in a random position)?
if(preg_match('/(^|,)1(,|$)/',$str))
{ echo one is found; }
---John
This one time, at band camp,
1LT John W. Holmes [EMAIL PROTECTED] wrote:
$a1=1,8,98,244,9,243,2,6,36,3,111,;
$a2=8,98,244,9,243,2,1,6,36,3,111,;
How can I exactly match 1, in both strings using one regular expression?
(first 1 is the first element and second time in a random
$a1=1,8,98,244,9,243,2,6,36,3,111,;
$a2=8,98,244,9,243,2,1,6,36,3,111,;
How can I exactly match 1, in both strings using one regular
expression?
(first 1 is the first element and second time in a random position)?
if(preg_match('/(^|,)1(,|$)/',$str))
{ echo one is found; }
This one time, at band camp,
1LT John W. Holmes [EMAIL PROTECTED] wrote:
Very true, I agree. For your solution, though, wouldn't it correctly match a
string such as '2,3,11,12' even though there is no entry that's just one?
Ok, why not something like this..
There is almost always a better
Very true, I agree. For your solution, though, wouldn't it correctly
match a
string such as '2,3,11,12' even though there is no entry that's just
one?
Ok, why not something like this..
There is almost always a better solution than regex
?php
$string = '98,244,9,243,2,6,36,3,111,';
Dear List,
This is a simple problem, but I can't really find a good
solution. and I have a general question also.
1) I have a webform that is save to a variable $html using
heredoc.
$html = WEBFORM
.
input name=company type=text value=$company
.
the problem is that when
1) You most likely have magic_quotes_gpc set to on. Either set it to
off or stripslashes() the input.
2) No, it won't print. Think of a heredoc as a quotes string without
the quotes. You can, however, do something like:
$variable = WHATEVER
whatever
text
goes
here
WHATEVER;
$variable.=
Hi;
i have a string and I want to set it as a variable name.
like tahat
i have string like: string;
how can i get variable $string;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 02:05 24.11.2002, empty said:
[snip]
i have string like: string;
how can i get variable $string;
[snip]
$var = 'string';
$$var will resolve as $string
--
O Ernest E. Vogelsinger
(\)ICQ #13394035
yiihhuuuvvv
it works;
I heard it, i remember variable variables I guess
Thanks all
EEV $var = 'string';
EEV $$var will resolve as $string
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hi,
infact i'm un
able to obtain a copy of my hosting company's php.ini
thanx
_
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--
PHP General Mailing List
(B"Khalid El-Kary" [EMAIL PROTECTED] wrote:
(B hi,
(B infact i'm un
(B able to obtain a copy of my hosting company's php.ini
(B
(BThen, perhaps, try running phpinfo() and compare.
(B
(BI think it might even have something to do with "register_globals".
(B
(B- E
(B
(B
(B--
(BPHP
hi,
the script infact never used register_globals because it's a class that has
nothing to do with the direct script input, but there's an idea that came to
my mind, maybe the company compiled its own PHP? may this change anything?
generally is Linux different from windows in String functions?
Hello,
(B
(B"Khalid El-Kary" [EMAIL PROTECTED] wrote:
(B
(B hi,
(B the script infact never used register_globals because it's a
(B class that has nothing to do with the direct script input, but
(B there's an idea that came to my mind, maybe the company
(B compiled its own PHP? may this
hi,
i was asking if there should be difference in functionality of PH string
functions (not mb_) between the two following configurations:
the company: PHP 4.2.1, Apache 1.3.20, linux
me: PHP 4.2.3, Apache 1.3.24, windows
my confthe company's conf
thread safety Enabled Disabled
Hello,
(B
(B"Khalid El-Kary" [EMAIL PROTECTED] wrote:
(B hi,
(B i was asking if there should be difference in functionality of PH string
(B functions (not mb_) between the two following configurations:
(B
(B the company: PHP 4.2.1, Apache 1.3.20, linux
(B me: PHP 4.2.3, Apache 1.3.24,
On Sunday 17 November 2002 06:27, Khalid El-Kary wrote:
hi,
i was asking if there should be difference in functionality of PH string
functions (not mb_) between the two following configurations:
the company: PHP 4.2.1, Apache 1.3.20, linux
me: PHP 4.2.3, Apache 1.3.24, windows
hi,
are there any php.ini directives that control the PHP string functions?
sorry i'm not percise but infact i have a 1200 lines script that acts well
on a windows machine with PHP 4.2.3 Apache 1.3.24, but on a linux machine
with PHP 4.2.1 (keep it secret :)) and Apache 1.3.20 it acts bad
but
Hello,
(B
(B"Khalid El-Kary" [EMAIL PROTECTED]wrote:
(B hi,
(B
(B are there any php.ini directives that control the PHP string functions?
(B
(BYou mean something like this? (Under "; Safe Mode")
(B
(B-
(B; This directive allows you to disable certain functions for security
I need to echo a string that contains both quotes and double
quotes.
I remember doing this once using a special construct where the
string started on a new line with a triple slash if I remember well. Or
it was a triple something...
I can't find the topic in the online PHP doc...
Anybody
On Wednesday 03 July 2002 09:54, C. Cormier - Ormetal Inc. wrote:
I need to echo a string that contains both quotes and double
quotes.
I remember doing this once using a special construct where the
string started on a new line with a triple slash if I remember well. Or
it was a triple
Ok I'm having a problem with the new line char \n in strings. I'm
trying to contrast an email that gets sent with the mail() function.
Here is what I'm doing.
$message = line1\n;
$message .= line2\n\n;
$message .= line3\n;
...
$message = lne99;
mail (email, subject, $message);
but when
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Greg Sidelinger blurted
Ok I'm having a problem with the new line char \n in strings. I'm
trying to contrast an email that gets sent with the mail() function.
Here is what I'm doing.
$message = line1\n;
$message .= line2\n\n;
: Friday, January 25, 2002 3:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] strings and \n
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Greg Sidelinger blurted
Ok I'm having a problem with the new line char \n in strings. I'm
trying to contrast an email that gets sent
On Saturday 26 January 2002 04:48, Greg Sidelinger wrote:
Ok I'm having a problem with the new line char \n in strings. I'm
trying to contrast an email that gets sent with the mail() function.
Here is what I'm doing.
$message = line1\n;
$message .= line2\n\n;
$message .= line3\n;
...
Hi,
I want to take something like the following:
$row = 1;
$ column = 1;
if ( $pages = r$row$column)
What I want to see is r1c1 as a string so I'm actually
concatenating the strings together.
Any ideas?
--
On Mon, Dec 24, 2001 at 01:48:38PM -0800, Phillip B. Bruce wrote:
I want to take something like the following:
$row = 1;
$ column = 1;
if ( $pages = r$row$column)
What I want to see is r1c1 as a string so I'm actually
concatenating the strings together.
if
Original message
From: Gerard Samuel [EMAIL PROTECTED]
Date: Wed, Aug 29, 2001 at 09:58:12PM -0400
Message-ID: [EMAIL PROTECTED]
Subject: Re: [PHP] strings in a function return
I found an error, but it didn't do me any good.
I tried this, any tips...
Thanks
function assign
Hey all. I just started venturing into functions. I have a function
that displays a form, but I have a problem with getting the multiple
strings back after the submit. Im tryed a return statement at the
bottom of the function, but it cannot take more than one string. I
tried turning the
On Thu, 30 Aug 2001 09:35, Gerard Samuel wrote:
Hey all. I just started venturing into functions. I have a function
that displays a form, but I have a problem with getting the multiple
strings back after the submit. Im tryed a return statement at the
bottom of the function, but it cannot
I was doing it like so ==
$string = array(var1, var2...);
return string;
I also tried to implode the array into a string and return the result,
but no go.
David Robley wrote:
On Thu, 30 Aug 2001 09:35, Gerard Samuel wrote:
Hey all. I just started venturing into functions. I have a
On Thu, 30 Aug 2001 10:19, Gerard Samuel wrote:
I was doing it like so ==
$string = array(var1, var2...);
return string;
I also tried to implode the array into a string and return the result,
but no go.
David Robley wrote:
On Thu, 30 Aug 2001 09:35, Gerard Samuel wrote:
Hey all. I
Here is a snippet example.
function assign() {
global $adminurl, $string;
top();
if ($string) {
$data = explode (|, $string);
echo $data[0];
}
form
$array =
Mozilla sucks sometimes with email formatting.
Correction==
Here is a snippet example.
function assign() {
global $adminurl, $string;
top();
if ($string) {
$data = explode (|, $string);
echo $data[0];
I found an error, but it didn't do me any good.
I tried this, any tips...
Thanks
function assign() {
global $adminurl, $string;
top();
if ($string) {
$data = explode (|, $string);
foreach ($data as $foo) {
On Thu, 30 Aug 2001 10:45, Gerard Samuel wrote:
Mozilla sucks sometimes with email formatting.
Correction==
Here is a snippet example.
function assign() {
global $adminurl, $string;
top();
if ($string) {
$data = explode (|, $string);
top(); is a function that displays a menu, that works.
form is where the form goes.
In its current setup less the array/implode/explode/foreach loop
I can get it to echo 'a' return that I specify. But its no good, when I
have 7 seven fields in the form to process.
David Robley wrote:
On
On Thu, 30 Aug 2001 11:38, Gerard Samuel wrote:
top(); is a function that displays a menu, that works.
form is where the form goes.
In its current setup less the array/implode/explode/foreach loop
I can get it to echo 'a' return that I specify. But its no good, when
I have 7 seven fields in
Im beginning to think that functions aren't all that cracked up to be.
I may as well go back to my old non function way of coding.
I was displaying the form in the function because the application Im
using currently displays forms in functions. Ill try and see what I can
do with this new found
On Wednesday 22 August 2001 03:05, Chris Aitken wrote:
I have come up with a bit of a problem
I have a little funky search form on a page, and when I send the search
data on as a URL, anything with a space is screwed up example
$search = This is a test;
echo a
I have come up with a bit of a problem
I have a little funky search form on a page, and when I send the search
data on as a URL, anything with a space is screwed up example
$search = This is a test;
echo a href=http://www.blah.com/foo.php?search=$search;
and when the
$search = This is a test;
echo a href=http://www.blah.com/foo.php?search=$search;
You'll want this:
echo a href=http://www.blah.com/foo.php?search=.urlencode($search).;
^^
Jason
--
PHP General Mailing
$search= urlencode ($search);
urlencode - have a look on the php site.
-Original Message-
From: Chris Aitken [mailto:[EMAIL PROTECTED]]
Sent: August 22, 2001 9:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Strings with Spaces in URLS
I have come up with a bit of a problem
I have
Hi,
How I can save the below string???
I try concatenate, but when I try with echo or print not display
nothing.
Best Regards
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact
Take out that first bit with the ?xml in it and I think you'll find that it
will work.
My guess is that you have short-tags enabled in your configuration, and PHP
could be acting screwy there...try sticking an escape character in front of
it like:
\?xml
And see if that works. It might not, but
THANKS
But I fix the problem with other way.
Thanks for reply me.
Manuel Román
VIVA EL ALAVES (LIFE ALAVES IN ENGLISH, is the spanish futbol club
than yesterday played with Liverpool the UEFA final)
Plutarck [EMAIL PROTECTED] wrote in message
9e0lsi$e5v$[EMAIL
I am attempting to pass a string value via a URL. I have tried using
urlencode and ereg_replace--with no luck.
Here is sample code:
$headline=urlencode("$headline");
print "a href
='http://www.contus.com/test_quote/quotepage.php3?site=$sitepage=miniquote;
subject=$headline'bContact us for more
I believe you have to urldecode. Try that and see what happens...
-jack
-Original Message-
From: Claudia [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 9:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Strings in URL
I am attempting to pass a string value via a URL. I have tried
On Tue, 27 Mar 2001 12:11, Claudia wrote:
I am attempting to pass a string value via a URL. I have tried using
urlencode and ereg_replace--with no luck.
Here is sample code:
$headline=urlencode("$headline");
print "a href
In article 99ou1p$tif$[EMAIL PROTECTED],
[EMAIL PROTECTED] ("Claudia") wrote:
$headline=urlencode("$headline");
print "a href
='http://www.contus.com/test_quote/quotepage.php3?site=$sitepage=miniquote;
subject=$headline'bContact us for more information/b/a/font";
Then in the
Was wondering if someone could tell me how I could do this..
I need the dynamically generated number (NUM) from a string, where the
string is:-
http://blah.blah.com/blah/blah?blah.com/blah=something:%3Asessionid=NUMdbname=blah
Now I tried explode and split, with the '' being as the delimiter,
in this variable as an array elements instead.
-Original Message-
From: Ashwin Kutty [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 9:04 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Strings..
Was wondering if someone could tell me how I could do this..
I need the dynamically generated number
[EMAIL PROTECTED] wrote:
How can i make http://www.something.com/blah/blah.zip into
blah/blah.zip
http://www.somethingcom is a constant.. always the same thing
how can i cut it out?
what comes to my mind right now is str_replace
('http://www.../','',$url)
where $url is the
How can i make http://www.something.com/blah/blah.zip into
blah/blah.zip
http://www.somethingcom is a constant.. always the same thing
how can i cut it out?
thnx
- Peter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
--- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 30, 2001 2:41 PM
Subject: [PHP] strings
How can i make http://www.something.com/blah/blah.zip into
blah/blah.zip
http://www.somethingcom is a constant.. always the same thing
how can i
Quick Question.
I have a form which has 10 fields, is there any way in PHP to take the values
once submitted and create a string for each??
Thanks
Ade
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Ade,
What kind of string? What do you want to do with them?
-Ben
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 2:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Strings??
Quick Question.
I have a form which has 10 fields
Ade asked:
I have a form which has 10 fields, is there any way in PHP to take the values
once submitted and create a string for each??
Absolutely. Worse; it is already done for you!
If you give the input box a name, and submit to a php page, the php page
contains a variable with that name!
If
77 matches
Mail list logo