Wrox Programmer Forums
|
BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1
This is the forum to discuss the Wrox book Professional PHP5 by Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove; ISBN: 9780764572821
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 28th, 2009, 02:56 PM
Authorized User
 
Join Date: Dec 2007
Posts: 65
Thanks: 9
Thanked 2 Times in 2 Posts
Send a message via AIM to sandeepgreaternoida Send a message via MSN to sandeepgreaternoida Send a message via Yahoo to sandeepgreaternoida
Default char() function

[
<?php
$name="Sandeep";
$lname="Gupta";
$fname= $name." ".$lname;
echo $fname;
echo "<br>";
$ab=strlen($fname);
echo $ab;
echo "<br>";
$cd=strstr($fname, " ");
echo $cd;
echo "<br>";
$ef=strpos($fname, "S");
echo $ef;
?>
/]

in the above code how to use char() function.

thanx !
__________________
sandeep gupta
 
Old May 8th, 2009, 03:34 PM
Authorized User
 
Join Date: Nov 2008
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Are u asking about chr() function

chr() is used to get the charecter for the given ascii value
Code:
<?php
$name="Sandeep";
$lname="Gupta";
$fname= $name." ".$lname;
echo $fname;
echo "<br>";
$ab=strlen($fname);
echo $ab;
echo "<br>";
$cd=strstr($fname, " ");
echo $cd;
echo "<br>";
$ef=strpos($fname, "S");
echo $ef;
$lname.=chr(27);\\add an escape charecter at the end
?>
http://in2.php.net/manual/en/function.chr.php





Similar Threads
Thread Thread Starter Forum Replies Last Post
Big challenge here! How to convert char* to char^? samiswt Visual C++ 2005 1 November 30th, 2007 09:09 PM
Please help with passing (char * name[]) pdang265 C++ Programming 1 September 26th, 2007 05:59 AM
Invalid conversion from 'char*' to 'char' deuxmio C++ Programming 3 December 8th, 2006 07:56 AM
Escape char for '-' mattastic Access 1 October 6th, 2005 03:27 PM
getting the last CHAR of a string kondapally Crystal Reports 0 December 13th, 2004 03:39 PM





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