Jump to content


Photo

string cutting


  • Please log in to reply
4 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 August 2006 - 12:41 PM

what was that function that let you cut up a string based on a character.
It's not substr()
like if you had
whatever.php
with the function I am thinking about you can specify the . symbol
then it put's it into an array with 3 values.
it would have
whatever
.
php
in 0, 1, 2 for an array instead of together so you can work with the individual parts?

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 SammyP

SammyP
  • Members
  • PipPipPip
  • Advanced Member
  • 58 posts
  • LocationLondon

Posted 03 August 2006 - 12:53 PM

Explode

Though it won't return the dot.

Sam.
If this has solved your problem, a quick 'Thanks' is appreciated, but marking the thread as 'Solved' is better - it saves a lot of time.

Sam.

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 August 2006 - 12:55 PM

I was thinking about explode, but I normally use it for other thing, it's worth a try though, thanks.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 SammyP

SammyP
  • Members
  • PipPipPip
  • Advanced Member
  • 58 posts
  • LocationLondon

Posted 03 August 2006 - 01:04 PM

I hope you can manage to make it work the way you want it to.

Good luck.

Sam.

If this has solved your problem, a quick 'Thanks' is appreciated, but marking the thread as 'Solved' is better - it saves a lot of time.

Sam.

#5 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 August 2006 - 01:20 PM

I did
explode(".", $subcategory);
$subcategory = $subcategory[1];
that pulls out everything on the right hand side of the period, it allowed me to lay the ground work for the rest of it, thanks.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users