Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 12th, 2006, 03:12 AM
Registered User
 
Join Date: Nov 2006
Location: chennai, tamilnadu, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to janakiraman
Default How to search for a particular value

Hi,

  $var = 'A','B','C'.

I have a variable like this. I need to remove the value 'B' from this so that the new variable will look like $var = 'A',C'.

How to do this in php?

Please help me.

Thanks in advance.

Janakiraman

Reply With Quote
  #2 (permalink)  
Old December 16th, 2006, 04:13 AM
Authorized User
 
Join Date: Sep 2006
Location: , Kerala, India.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to aneesh_sunu@yahoo.co.in Send a message via Yahoo to aneesh_sunu@yahoo.co.in
Default

Hai
You have to store these values in an array.
Then you can search the array

Reagards
Aneesh
Reply With Quote
  #3 (permalink)  
Old December 17th, 2006, 11:45 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hai,
try with following method, but this is not a proper method.
<?php
$var = "'A','B','C'";
echo str_replace("'B',","", $var) ;
?>

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search button doesn't search Access DB cbones Visual Studio 2008 1 October 27th, 2008 07:36 PM
New text search doesn't preselect search string planoie Visual Studio 2005 0 July 23rd, 2007 06:47 AM
File Search / Indexing Search with .net 2.0 maulik77 ASP.NET 1.0 and 1.1 Basics 2 March 15th, 2007 12:45 AM
Search Engine for Full-text Search Kala ASP.NET 1.0 and 1.1 Professional 2 August 29th, 2004 02:16 AM
Search engine that search through local drive! wenzation Classic ASP Basics 0 August 26th, 2003 09:15 PM



All times are GMT -4. The time now is 07:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.