5 Replies - 1399 Views - Last Post: 19 September 2012 - 06:41 PM Rate Topic: -----

#1 g37752  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 195
  • Joined: 24-July 12

how do I explode with these characters?

Posted 18 September 2012 - 09:13 PM

How do I identify these characters returned from jQuery “ and ” ?
why would they use such characters?

I am trying to parse the results using explode, and I just realized that these are not double quotes.. so how do I explode?

This post has been edited by g37752: 18 September 2012 - 09:15 PM

Is This A Good Question/Topic? 0
  • +

Replies To: how do I explode with these characters?

#2 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 922
  • View blog
  • Posts: 3,195
  • Joined: 19-January 10

Re: how do I explode with these characters?

Posted 18 September 2012 - 09:18 PM

... why don't you just copy/paste them?

btw I believe they're quotation marks. Here's some info on how to use them.
Was This Post Helpful? 0
  • +
  • -

#3 g37752  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 195
  • Joined: 24-July 12

Re: how do I explode with these characters?

Posted 18 September 2012 - 09:40 PM

i tried this, but it's not working?

$a=explode(utf8_encode(''),$result);

Was This Post Helpful? 0
  • +
  • -

#4 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2834
  • View blog
  • Posts: 9,740
  • Joined: 08-August 08

Re: how do I explode with these characters?

Posted 19 September 2012 - 10:50 AM

You could use str_replace():
$string = str_replace(array('“','”','‘','’'), array('"','"',"'","'"), $result);
$a = explode('"', $string);

This post has been edited by CTphpnwb: 19 September 2012 - 06:39 PM
Reason for edit:: explode works on $string, not $result!

Was This Post Helpful? 3
  • +
  • -

#5 g37752  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 195
  • Joined: 24-July 12

Re: how do I explode with these characters?

Posted 19 September 2012 - 01:13 PM

View PostCTphpnwb, on 19 September 2012 - 10:50 AM, said:

You could use str_replace():
$string = str_replace(array('','','',''), array('"','"',"'","'"), $result);
$a = explode('"', $result);


nice. I thought all these function work the same way and I was wrong!
Was This Post Helpful? 0
  • +
  • -

#6 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2834
  • View blog
  • Posts: 9,740
  • Joined: 08-August 08

Re: how do I explode with these characters?

Posted 19 September 2012 - 06:41 PM

Oops! See my bug fix above. ($string, not $result)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1