"S" == "K Simon" [EMAIL PROTECTED] writes:
Thx, but could anybody give me an example? It shouldnt be too hard?!
If you feel you have to do it in php then this should work. You'd save
a lot of effort if you used the unix 'cut' command though.
cut -d ' ' -f 1 inputfile.txt outputfile.txt
"BC" == Brian Clark [EMAIL PROTECTED] writes:
Hello Dallas,
(DK == "Dallas Kropka") [EMAIL PROTECTED] writes:
DK Posted earlier but got no response so here it is again...
I gave you a quick explanation of one way to do it earlier, but I
know of no tutorials off the top of my
an't draw for toffee)
--
Robin Vickery.
BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
earnt various fun, but not particularly commercial languages at Uni.
Picked up Perl while working in a Sysadmin role, then PHP/FI when roped
into developing a website. I converted to PHP3 with some relief as soon
as it came out and now most of my work is in P
P3 and now PHP4.
PHP/FI had a few quirks... the syntax for function definitions
for example:
function functionname $param1 $param2 (
statement1;
statement2;
...
);
PHP3 was a definite improvement.
--
Robin Vickery.
BlueCarrots, 14th
"MT" == Martin Thoma [EMAIL PROTECTED] writes:
Hello ! How can I use eregi_replace to replace every "BR" with
"", except when it's "BBR" ??
You need a lookbehind assertion...
$string = preg_replace( '/(?!b)br/i', '', $stri
[EMAIL PROTECTED] (Stefen Lars) writes:
In the Apache config file, we have the following directive:
SetEnvIfNoCase Referer ^http://www.oursite.com/; local_ref=1
FilesMatch .(gif|jpg)
Order Allow,Deny
Allow from env=local_ref
/FilesMatch
We use this to prevent people from
[EMAIL PROTECTED] (Mike Gifford) writes:
Hello,
I'm trying to replace a couple of lines of code:
$dotpos = 1 - (strlen($userfile_name) - strpos($userfile_name, '.'));
$extension = substr($userfile_name, $dotpos);
with a simpler regular expression:
$extension =
[EMAIL PROTECTED] (Martin Lindhe) writes:
Hi Martin,
Take a look at the Apache mod_rewrite docs.
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
Thanks alot!
I made a similar solution which works
RewriteEngine on
RewriteRule ^/x/(.*)
[EMAIL PROTECTED] (Richard Lynch) writes:
A callback is when you execute a function, and you provide to it a name of
*another* function, which it will call on some data in the middle of its
task.
It's a very handy way to provide extreme flexibility in functional
languages.
For example:
[EMAIL PROTECTED] (George Pitcher) writes:
Andrew,
I am in a similar position witha Lasso site, which I am considering php-ing.
I need to do conditional redirects.
George P, Edinburgh
- Original Message -
From: Andrew Penniman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
[EMAIL PROTECTED] (Balaji Ankem) writes:
What is the problem with following code..
$sql1=DELETE from tinventory where inv_tag='$inv_tag';
no closing doublequote.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
?
Mainly because your closing 'table' tag is missing its slash.
The duplicated 'head' and 'body' tags probably aren't helping
either.
-robin
--
Robin Vickery.
BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE
--
PHP General Ma
of text' ),
$string
);
print $string . "br\n";
?
The output would be:
this is my string.
this is your bit of text.
--
Robin Vickery.
BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W
foreach ($return as $line) {
if( preg_match($regex, $line, $match) ) break;
}
if (!isset($match)) return false;
return $amount * $match[1];
}
}
$money = new currency;
print $money-convert( 10, "GBP", "AUD" );
?
--
Robin Vickery...
"VB" == "Brian V Bonini" [EMAIL PROTECTED] writes:
Ah right, strings not words, I feel like a dummy now... ;-)
-Original Message- From: John Vanderbeck
[mailto:[EMAIL PROTECTED]] Sent: Thursday, February 15, 2001
10:57 AM To: [EMAIL PROTECTED]; Robin Vickery
t preg_replace( '/\b/', '-', 'this is a string' ) . "br\n";
It will output:
-this- -is- -a- -string-
As it replaces all the word boundaries with a hyphen.
So the regular expression /\bis\b/ will match only the word 'is'
and not 'this' or 'isotope' or 'biscuit'.
r examples you were implicitly converting from a boolean type
to an integer or a string. Try this:
print gettype(true) . "br\n";
print gettype(0 + true) . "br\n";
print gettype('' . true) . "br\n";
-robin
--
Robin Vickery...
ay = range( $start, $finish );
// it really irritates me the way PHP's sort functions mess around
// with the original array rather than returning a sorted array so
// I can assign it to where I want it.
shuffle( $rand_array );
return $rand_array;
}
print_r( rand_array(1, 10) );
?
th problem, especially if you can run 'ls'. Try
giving the full path to 'find'.
-robin
--
Robin Vickery.
BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-ma
"GROUP BY issues.course_name";
The result would be a single entry for each course with the total time.
hope this helps
-robin
--
Robin Vickery.
BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE
--
ImageSize() on the uploaded file, before
you move it and look at the [2] element of what is returned. This
will give you the actual type of file from inspecting its contents
rather than just trusting the extension that was typed.
Or look at the mime type held in $HTTP_POST_FILES['
On 25/10/2007, Werner Schneider [EMAIL PROTECTED] wrote:
Hi.
Are there any limitations of preg_replace and is there
a way to change them (for example with ini_set)?
I got a php 4.4.7 on a linux-webhoster which crashes
without error-message on this script:
?php
$txt = ;
On 30/10/2007, Stijn Verholen [EMAIL PROTECTED] wrote:
Hey list,
I'm having problems with grouped alternative patterns.
The regex I would like to use, is the following:
On 30/10/2007, Per Jessen [EMAIL PROTECTED] wrote:
Larry Garfield wrote:
On Monday 29 October 2007, Per Jessen wrote:
Cristian Vrabie wrote:
Hmm 117,223 hosts with php4 only support. Did you actually checked
how many have php5 support? Many more.
There are 178.112 hosters that have
On 31/10/2007, Steven Macintyre [EMAIL PROTECTED] wrote:
Hiya,
I have the following code ... which only seems to result in one item ...
which is incorrect ... can anyone spot my problem?
if ($armbase != ) {
$options = explode(,, $armbase);
$text .=
On 31/10/2007, Steve Marquez [EMAIL PROTECTED] wrote:
Greetings,
I have a script that looks for the variable to be NULL and then execute. Is
there a way for the script to look for anything or something in the variable
and then execute?
Ex:
If (Œ$a¹ == Œ ANYTHING¹) {
oh dear, krazee
On 05/11/2007, Zoltán Németh [EMAIL PROTECTED] wrote:
2007. 11. 5, hétfő keltezéssel 06.10-kor Ronald Wiplinger ezt írta:
Jim Lucas wrote:
Ronald Wiplinger wrote:
I have a file linked with require into my program with statements like:
define(_ADDRESS,Address);
define(_CITY,City);
On 06/11/2007, Neil Saunders [EMAIL PROTECTED] wrote:
Hi All,
I'm experiencing some differences in in the return values of strftime
on Windows Linux platforms on PHP 5.2.1. I've knocked up a test case
to demonstrate the bug:
?php
$UNIX_TIME = mktime(0,0,0,5,31,2008);
echo Time Made for
On 06/11/2007, Neil Saunders [EMAIL PROTECTED] wrote:
Hi Robin,
Thanks for your reply. The times are exactly synchronized. I'm looking
at the date section in the output of phpinfo(), and get the following:
Development
Default timezoneEurope/London
Production:
Default timezone
On 07/11/2007, kNish [EMAIL PROTECTED] wrote:
Hi,
A newbie question. I have more than one table to access from a database.
When I use the code as below, it gives no response on the web page.
What may I do to run more than one table from the same database into the
script.
Firstly, turn
On 08/11/2007, Jochem Maas [EMAIL PROTECTED] wrote:
Al wrote:
Delimiters needed. Can use about anything not already in your pattern.
/ is very commonly used; but I like # or % generally; but, you
can't use % because your pattern has it.
$html = preg_replace(#%ResID#,$bookid,$html);
On 12/11/2007, Ronald Wiplinger [EMAIL PROTECTED] wrote:
Chris wrote:
Ronald Wiplinger wrote:
My php program is working with Firefox, but not with Internet Explorer.
Nothing to do with php, your problem is javascript.
Is there a tool to find the problem?
For IE, try
On 16/11/2007, Paul van Haren [EMAIL PROTECTED] wrote:
I'm trying to use arrays to implement a sort of data tree. For the code to
work, it is essential that the nodes can be edited after they have become
part of the tree. That would require that the array elements are pushed
by reference
On 28/11/2007, AmirBehzad Eslami [EMAIL PROTECTED] wrote:
On Wednesday 21 November 2007 03:14:43 Ronald Wiplinger wrote:
I have an application, where I use pictures. The size of the picture is
about 90kB and to speed up the preview, I made a thumbnail of each
picture which is about 2.5 to
On 10/12/2007, Nathan Nobbe [EMAIL PROTECTED] wrote:
On Dec 10, 2007 5:29 PM, Robert Cummings [EMAIL PROTECTED] wrote:
On Mon, 2007-12-10 at 14:22 -0600, Jay Blanchard wrote:
[snip]
Can you say for certain nature is truly random? Just because the seed
may have occurred 13.7 billion
On 12/12/2007, Daniel Brown [EMAIL PROTECTED] wrote:
On Dec 12, 2007 9:00 AM, tedd [EMAIL PROTECTED] wrote:
At 3:04 PM -0500 12/10/07, Daniel Brown wrote:
Unfortunately, because computers are logical, there's no such
thing (at least as of yet) as a truly random number being generated
On 19/12/2007, js [EMAIL PROTECTED] wrote:
Hi Jochem,
Sorry, I missed static.
So, getDB() would works like singleton, right?
I agree that's better method to manage dbh.
The technique is called memoization (http://en.wikipedia.org/wiki/Memoization).
-robin
--
PHP General Mailing List
On 21/02/2008, Nathan Rixham [EMAIL PROTECTED] wrote:
The regex looks incorrect to me in a few places:
-\d+] {1,4}
for example.
That's ok, albeit confusing:
* The ']' is a literal ']' not the closing bracket of a character class.
* The {1,4} applies to the space character.
-robin
--
PHP
On 25/02/2008, Rob Gould [EMAIL PROTECTED] wrote:
I've got 2 tables. One table which contains a series of barcodes assigned to
product id #'s, and another table with JUST product id #'s.
I need to somehow transfer all the barcodes from the first table into the
second table, but only where
On 28/02/2008, Robert Cummings [EMAIL PROTECTED] wrote:
On Thu, 2008-02-28 at 12:39 +, Nathan Rixham wrote:
Aschwin Wesselius wrote:
Stut wrote:
Just because it works doesn't mean it's right.
-Stut
What I meant was that I tested the script and it worked,
On 31/05/07, blueboy [EMAIL PROTECTED] wrote:
On my localhost this works fine
$result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id,
display FROM NEWS);
1. check return values, $result should not be false unless there's a problem.
2. if $result is false, check
On 06/06/07, blueboy [EMAIL PROTECTED] wrote:
I want to force users to insert landscape rather portrait images. I don't
want to be too pedantic about it but they do need to have an approximate 4x3
aspect ratio.
This is my code so far.
$max_height = 500; // This is in pixels
$max_width = 500;
On 06/06/07, Brad Fuller [EMAIL PROTECTED] wrote:
Daniel Brown wrote:
On 6/6/07, Brad Fuller [EMAIL PROTECTED] wrote:
I need to strip out a domain name from a URL, and ignore subdomains
(like www)
I can use parse_url to get the hostname. And my first thought was to
take the last 2
On 10/06/07, Dave M G [EMAIL PROTECTED] wrote:
PHP General List,
With a little help from the web, and help from this list, I have a
simple CAPTCHA image that works within the content system I'm building.
But it's *really* simple. Basically white text on a black background,
with a couple of
On 12/06/07, Richard Lynch [EMAIL PROTECTED] wrote:
On Tue, June 12, 2007 9:33 am, Tijnema wrote:
I meant reverse order :P
That would be pretty broken.
There's no guarantee that browsers will present the inputs in any
order at all, even though they all seem (so far) to follow the
convention
On 13/06/07, Richard Lynch [EMAIL PROTECTED] wrote:
On Wed, June 13, 2007 3:36 am, Robin Vickery wrote:
On 12/06/07, Richard Lynch [EMAIL PROTECTED] wrote:
On Tue, June 12, 2007 9:33 am, Tijnema wrote:
I meant reverse order :P
That would be pretty broken.
There's no guarantee
On 13/06/07, Richard Davey [EMAIL PROTECTED] wrote:
Hi Robert,
Wednesday, June 13, 2007, 3:15:39 PM, you wrote:
It's terribly verbose and inefficient...
?php
$filter['flags'] = 0;
if( $allow_fraction )
{
$filter['flags'] |= FILTER_FLAG_ALLOW_FRACTION;
}
if( $allow_thousand )
{
On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote:
$userparam = test['sam'][];
// How to check if $userparam exists in the $_POST array
// and get all the values from it?
full_key_exists(test['sam'][], $_POST) // returns true if key is set
full_find_key(test['sam'][], $_POST)
On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote:
Hi Robin,
Tuesday, June 19, 2007, 8:28:50 PM, you wrote:
On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote:
$userparam = test['sam'][];
// How to check if $userparam exists in the $_POST array
// and get all the values
On 21/06/07, Richard Davey [EMAIL PROTECTED] wrote:
Hi,
I've written a short regexp which will *count* how many capital letters
are in a given string (the woefully simple: '/[A-Z]/')
Although it's an English language web site, I'm curious how you'd
count capital letters that span beyond just
On 25/06/07, Eric Butera [EMAIL PROTECTED] wrote:
I've been trying to figure out a way to do this all day and I'm afraid
I might need a bit of help. Basically I am trying to port over
something from Java to PHP and I'm stuck on one particular piece of
code:
if ((ba[i + 0] == (byte)0xa7) (ba[i
On 26/06/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-06-26 at 14:09 +0100, Stut wrote:
Robert Cummings wrote:
On Tue, 2007-06-26 at 14:33 +0200, Emil Edeholt wrote:
Hi!
My php project would get a much cleaner code if I could set cookies
anywhere in the code. So I thought
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array that can detect if a partial
value is in an array value or not:
e.g.
$var1 = big horse;$var2 = small yellow;$var3 = red hydrant;
$theArray = array(big blue horse, small yellow bird, giant red
On 11/07/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Wed, 2007-07-11 at 09:46 +0100, Robin Vickery wrote:
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array that can detect if a partial
value is in an array value or not:
e.g.
$var1 = big
On 24/07/07, Chris Mika [EMAIL PROTECTED] wrote:
I don't know if I'm doing something wrong or if this is a bug.
Very simply: I created an array with values 1-5. I use a foreach loop to
iterate over it to add 1 to the values. It correctly iterates over the
array except for the last value.
Code:
On 31/07/07, Carlton Whitehead [EMAIL PROTECTED] wrote:
Hi all,
I have an array like this:
$chance = array(lowercase = 27, uppercase = 62, integer = 46);
The values for each of the keys are randomly generated. I want to find the
key name of the one which has the highest value. Currently,
On 31/07/07, Alister Bulman [EMAIL PROTECTED] wrote:
On 31/07/07, Carlton Whitehead [EMAIL PROTECTED] wrote:
Couldn't you just do
arsort($chance);
$lastItem = chance[( count( $chance ) - 1 )];
I tried that earlier, but the problem is:
count( $chance ) - 1 ); returns an integer, so I
On 31/07/07, Ken Tozier [EMAIL PROTECTED] wrote:
Turns out that objects returned from SQL queries contain two parts
for every field, one with a string key and one with an index key.
Adding an is_numeric test on the keys allows you to filter out the
numeric keys if you want to. For example:
Or
On 01/08/07, CK [EMAIL PROTECTED] wrote:
Hi,
My script is working,
[...]
$regexp = ^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]
+)*(\.[a-z]{2,4})$;
If your script is using that regular expression to validate email addresses
then your script is most definitely not working.
On 02/08/07, CK [EMAIL PROTECTED] wrote:
Hi,
Would you point out why? As I've tested a range of email address,
and have not found one rejected that is formatted correctly.
ok, here's a few perfectly valid email addresses off the top of my
head. The first one's especially annoying as I use it
On 02/08/07, js [EMAIL PROTECTED] wrote:
Hi list.
I'm trying to write a ORM in PHP.
I want the ORM to have metadata mapping, which have a list of properties name
and the value, without using any external file.
(I like simple one, not want messy XML)
I'm thinking PHP's reflective
.
The best advice for validating email addresses is don't do it with a
regexp. Send an email to the address with a link in it for them to
confirm their registration.
On Aug 1, 2007, at 11:08 PM, Robin Vickery wrote:
On 02/08/07, CK [EMAIL PROTECTED] wrote:
Hi,
Would you point out why
On 18/09/2007, Christoph Boget [EMAIL PROTECTED] wrote:
I looked in the docs but didn't see anything regarding case
insensitivity and I fear the functionality doesn't exist. I'm just
hoping I'm looking in the wrong place.
Is there a way to get ksort to work without regard to case? When I
On 09/10/2007, Jay Blanchard [EMAIL PROTECTED] wrote:
Good afternoon gurus and guru-ettes!
I am searching for an algorithm that will take a list of monetary values
and determine which of these values totals a value supplied to the
widget.
1. I supply a value to the application and give a
On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote:
hi
I have a problem with calling functions:
?php
function solution1($var1){
// some code
}
function solution2($var2){
// some code
}
function solution3($var3){
// some code
}
if ($function == 'solution1'
On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote:
Robin Vickery wrote:
On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote:
hi
I have a problem with calling functions:
?php
function solution1($var1){
// some code
}
function solution2($var2){
// some
On 31/07/06, Jon Anderson [EMAIL PROTECTED] wrote:
Jay Blanchard wrote:
Yes, but that shouldn't matter. The algorithms for RSA, AES, etc, etc
are all publicly available, why bother hiding their JavaScript
implementations? Only the data would be encrypted.
[/snip]
So, you're suggesting that
On 02/08/06, Jochem Maas [EMAIL PROTECTED] wrote:
Russell Jones wrote:
In real life terms, if you walked into the store and saw that the cash
register was slightly broken and slightly opened, and reached in and pulled
out a dollar to show the cashier what was wrong, you would not get in
On 04/08/06, Dave M G [EMAIL PROTECTED] wrote:
It seemed that the main difference was that preg_replace required
forward slashes around the regular expression, like so:
preg_replace(/!DOCTYPE(.*)ul/, , $htmlPage);
It requires delimiters - slashes are conventional, but other
characters can be
On 10/08/06, Chris W. Parker [EMAIL PROTECTED] wrote:
Jonathan Duncan mailto:[EMAIL PROTECTED]
on Wednesday, August 09, 2006 3:55 PM said:
If you want to really learn Linux, try Gentoo. If you just want a
very good and easy to use Linux, go with SuSE.
To keep this related to the
On 24/09/06, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote:
Hi everyone
I have array of numbers and I want to get out of it a list of numbers
that if I sum them it will be 100, here is my list (for example ) :
$list = array(10,20,10,10,30,50,33,110,381,338,20,11,200,100);
I want the result to be
On 03/10/06, David Robley [EMAIL PROTECTED] wrote:
Michelle Konzack wrote:
Am 2006-09-27 17:39:25, schrieb David Robley:
88 tons!! Point us to an image of that please.
Currently not availlable but it is an ex Pershing II Transporter
from the US-Army manufactured by the german Enterprise
On 17/10/06, Al [EMAIL PROTECTED] wrote:
AYSERVE.NET wrote:
Please, I need help on how to to recognise url in a block of text being
retrieved from a database and present it as a link within that text.
I will appreciate any help.
Regards,
Bunmi
Show us some examples of URL substrings, with
On 18/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:
On Tue, 17 Oct 2006 17:26:42 +0100, Robin Vickery wrote:
On 17/10/06, Al [EMAIL PROTECTED] wrote:
AYSERVE.NET wrote:
Please, I need help on how to to recognise url in a block of text being
retrieved from a database and present
On 18/10/06, AYSERVE.NET [EMAIL PROTECTED] wrote:
Hello Guys,
I thought I was home and dry when the program worked fine on my windows
but when I ran from my Linus server, I keep getting a url like:
http://www.website.com/pdf/ED1.pdf%A0 instead of
http://www.website.com/pdf/ED1.pdf.
I'd look at
On 19/10/06, Bagus Nugroho [EMAIL PROTECTED] wrote:
Hi All,
If we have variable like :
$var1 = 'abcde 12';
$var2 = 'abcdefghi 34';
$var3 = 'abc 20 def';
Then we want output like :
$var1 = 'abcde';
$var2 = 'abcdefghi';
$var3 = 'abc def';
$re = '/^\s+|\d+\s*|\s*\d+\s*$/';
$var1 =
On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:
On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote:
On Fri, October 27, 2006 4:53 pm, Børge Holen wrote:
On Friday 27 October 2006 19:34, Richard Lynch wrote:
And the header(Location: ...) requires a full URL.
No it doesn't. but
On 30/10/06, Robert Cummings [EMAIL PROTECTED] wrote:
On Mon, 2006-10-30 at 12:28 +0100, Robin Vickery wrote:
On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:
On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote:
On Fri, October 27, 2006 4:53 pm, Børge Holen wrote
On 01/11/06, Mel [EMAIL PROTECTED] wrote:
Here is the code for a testing page: http://www.squareinch.net/
client_testing.php?art=btw_logo.jpg
I am sure it is a mess since it is my first!!!
[]
include(http://www.squareinch.net/include/misc.inc;);
Don't do that - publishing your
On 01/11/06, Mel [EMAIL PROTECTED] wrote:
Thank you so much.
Yes, I was afraid of putting my passwords...
I can move the include file outside the directory, but what do you
mean by include the file directly
Please respond to the list
What I meant was to do this:
On 07/11/06, James Tu [EMAIL PROTECTED] wrote:
Thanks everyone for the helpful links and suggestions!
Any people here with access to a country list in Arabic or Chinese?
http://www.foreignword.com/countries/Arabic.htm
-robin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
On 15/11/06, Aaron Koning [EMAIL PROTECTED] wrote:
Assuming var1 and var2 only ever use the last four numbers (untested):
$length = strlen($number); // get string length
$var1 = substr($number,0,$length-4); // get number until only 4 numbers are
left
$var2 = substr($number,$length-4,2); // get
On 29/11/06, Travis Doherty [EMAIL PROTECTED] wrote:
Tom Chubb wrote:
On 28/11/06, Dave Goodchild [EMAIL PROTECTED] wrote:
Hi all. I am building a web app and as part of it advertisers can upload
their ad image and website URL to go with their ad. Is there a good
way to
detect whether
Hiyah,
Here's a trick you can use to evaluate expressions within strings. It
may not be particularly useful, but I thought it was interesting.
It exploits two things:
1. If you interpolate an array element within a string, the index of
the element is evaluated as a php expression.
2. You can
On 20/03/2008, Lamp Lists [EMAIL PROTECTED] wrote:
hi,
I saw several times that some people use this
$parameters = array(
'param1' = {$_POST[param1]},
'param2' = {$_POST[param2]}
);
or
$query = mysql_query(SELECT * FROM table1 WHERE id='{$session_id}');
I would use:
On 20/03/2008, Robin Vickery [EMAIL PROTECTED] wrote:
Hiyah,
Here's a trick you can use to evaluate expressions within strings. It
may not be particularly useful, but I thought it was interesting.
It exploits two things:
1. If you interpolate an array element within a string, the index
On 27/03/2008, Christoph Boget [EMAIL PROTECTED] wrote:
Let's say I have the following structure:
?xml version=1.0 encoding=UTF-8?
root
child id=c1
child id=gc1
child id=ggc1/
child id=ggc2/
/child
On 27/03/2008, Christoph Boget [EMAIL PROTECTED] wrote:
Is that possible? Or is this something I'd have to do programatically
using the nodes returned by the XPath query? Basically, I'm just
trying to get a fragment of the larger xml document...
//[EMAIL
On 28/03/2008, Bastien Koert [EMAIL PROTECTED] wrote:
On Thu, Mar 27, 2008 at 10:23 PM, Bill Guion [EMAIL PROTECTED] wrote:
At 1:28 PM -0400 3/26/08, Al wrote:
I'm scripting a simple registry where the user can input their name
and email address.
I'd like to do a quick
On 28/03/2008, Bagus Nugroho [EMAIL PROTECTED] wrote:
Hello,
If I have an array like this
$dataArray = array(0=array('type'='da'), 1=array('type'='wb'),
2=array('type'='da');
How I can filtering to get only 'da' only, like this
$newDataArray =
On 10/04/2008, Thijs Lensselink [EMAIL PROTECTED] wrote:
Quoting Luca Paolella [EMAIL PROTECTED]:
How do I install/activate the GD library with my existing PHP version?
I'm quite sure it isn't already, since I got this error:
Fatal error: Call to undefined function imagecreate() in
On 10/04/2008, Thijs Lensselink [EMAIL PROTECTED] wrote:
Quoting Robin Vickery [EMAIL PROTECTED]:
On 10/04/2008, Thijs Lensselink [EMAIL PROTECTED] wrote:
Quoting Luca Paolella [EMAIL PROTECTED]:
How do I install/activate the GD library with my existing PHP version?
I'm
On 10/04/2008, Jason Norwood-Young [EMAIL PROTECTED] wrote:
On Thu, 2008-04-10 at 13:15 +0100, Richard Heyes wrote:
First post to this list! I'm trying to figure out how to evaluate a
string with a mathematical expression and get a result, but without
using eval() as I'm accepting
On 16/04/2008, Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
What about encapsulation?
Interfaces have nothing to do with encapsulation for the smple reason
that I
can have encapsulation without using interfaces.
Unique use of logic there.
By similar reasoning; swimming trunks have
On 16/04/2008, Tony Marston [EMAIL PROTECTED] wrote:
-Original Message-
From: Robin Vickery [mailto:[EMAIL PROTECTED]
Sent: 16 April 2008 17:23
To: Jay Blanchard
Cc: Tony Marston; php-general@lists.php.net
Subject: Re: [PHP] What is the practical use of abstract
2008/5/1 Richard Luckhurst [EMAIL PROTECTED]:
Hi Chris,
In perl ther is the concept of @_ which is the list of incoming parameter
to a
subroutine. It is possible to have something like
my $sock = shift;
As I understand this the first parameter of the @_ list would be shifted.
I
2008/4/30 Nathan Nobbe [EMAIL PROTECTED]:
On Wed, Apr 30, 2008 at 2:58 PM, Richard Heyes [EMAIL PROTECTED] wrote:
but I was thinking if there is the function does that.
array_filter(). Note this:
If no callback is supplied, all entries of input equal to FALSE (see
converting
2008/5/13 Stut [EMAIL PROTECTED]:
On 13 May 2008, at 09:04, Peter Ford wrote:
I think the onus is on the coders of Urchin to document how to avoid
errors when Javascript is disabled, not the site developer who uses it.
Just to repeat a point I made yesterday which was clearly either
2008/5/13 Stut [EMAIL PROTECTED]:
On 13 May 2008, at 10:32, Robin Vickery wrote:
2008/5/13 Stut [EMAIL PROTECTED]:
On 13 May 2008, at 09:04, Peter Ford wrote:
I think the onus is on the coders of Urchin to document how to avoid
errors when Javascript is disabled
1 - 100 of 270 matches
Mail list logo