Search found 5 matches

by gojira999
Mon Sep 06, 2004 7:53 am
Forum: PHP - Code
Topic: Ditching characters in a value
Replies: 4
Views: 490

feyd wrote:

Code: Select all

substr($value,0,strlen($value) - 2);
Magic! Will try it tonight & let you know.

Thanks Feyd!!! :D
by gojira999
Mon Sep 06, 2004 7:29 am
Forum: PHP - Code
Topic: Ditching characters in a value
Replies: 4
Views: 490

feyd wrote:[php_man]substr[/php_man]
Aha. Thanks.

So on that basis, would this work?

Code: Select all

<?php
if
strlen($value)>6 
$searchvalue = substr("$value", 0, 5);
else
$searchvalue = substr("$value", 0, 4);
?>
by gojira999
Mon Sep 06, 2004 7:09 am
Forum: PHP - Code
Topic: [SOLVED] My search script doesn't work!
Replies: 3
Views: 1069

Thanks for the replies/assistance.

I have rebuilt the application from the ground up using a simpler design & low and behold it works!!!! :oops:

I have learnt a valuable "walk before running" lesson here......

Best wishes.

Gojira
by gojira999
Mon Sep 06, 2004 7:07 am
Forum: PHP - Code
Topic: Ditching characters in a value
Replies: 4
Views: 490

Ditching characters in a value

How do I ditch the last 2 characters in a value? I have built a MYSQL database driven website based on the common postcode for an area. By that I mean the county code (say GL) the county split (say 2) and the district (say 4) - this example would have a common postcode of GL2 4 (an actual postcode w...
by gojira999
Fri Sep 03, 2004 7:49 am
Forum: PHP - Code
Topic: [SOLVED] My search script doesn't work!
Replies: 3
Views: 1069

[SOLVED] My search script doesn't work!

feyd | Please use and tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color] Hello all. I am on day 3 of learning how to use mysql/php and have written the script below. Unfortunately it doesn't work! Where I e...