Get support from Xavier Media
It is currently Sun Dec 08, 2013 3:37 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: no space
PostPosted: Sun Oct 22, 2006 2:30 pm 

Points:
hi guys...

i hear there are code for erase the SPACE in the words enter in text when enter in the database can i know the code .. plz .. :)


Report this post
Top
  
Reply with quote  
 Post subject: No spaces in a string
PostPosted: Sun Oct 22, 2006 3:37 pm 

Points:
Are you talking about getting rid of the space/tab/return characters at the end or beginning of a string? if so trim(); is the function that you need.

You can also use ltrim() rtrim() to only strip the spaces from the beginning or end of a string.

Now if you are talking about deleting all " " (spaces) in a string use this code:


[php]<?php

$bodytag = str_replace(" ", "", "No Spaces In This String");

// Makes: NoSpacesInThisString

?>[/php]

:wink:


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]