Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: FederalProgrammer
  • Order by date
  1. FederalProgrammer

    replacing double space by a single

    just in case any one's interested, following did the magic: $newsText = str_replace("“", '"', $newsText); $newsText = str_replace("”", '"', $newsText); I just hope my clients don't come up w/ any other weird way of typing a single/double qoute.... KarveR, thanx for your help dude ;) cheers!
  2. FederalProgrammer

    replacing double space by a single

    and here's the text that's being grabbed from the DB: <p class=\"MsoNormal\" style=\"MARGIN: 0in 0in 0pt\">Daily Market Update<span style=\"mso-spacerun: yes\"> </span></p><p class=\"MsoNormal\" style=\"MARGIN: 0in 0in 0pt\"> <p /></p><table style=\"BORDER-RIGHT: medium none; BORDER-TOP...
  3. FederalProgrammer

    replacing double space by a single

    here's the code: <? session_start(); if($_SESSION['logedin'] == 'yes') { $head = 2; } else { $head = 3; $_SESSION['logedin'] = 'no'; } include('includes/head.php'); include('includes/functions.php'); include('includes/connect.php'); if (isset($_GET['nid'])) $nid = $_GET['nid']; else {...
  4. FederalProgrammer

    replacing double space by a single

    sure, it did ;) It got rid of the text I was looking for; $newsText = str_replace("<span style=" . '"' . "mso-spacerun: yes" . '"' .">  </span>", " ", $newsText); $newsText = str_replace("<span style=" . '"' . "mso-spacerun: yes" . '"' ."> </span>", " ", $newsText); but now, the user has just...
  5. FederalProgrammer

    replacing double space by a single

    u're funny man!! The code is right here... ALL OF IT :) it's the 11th post (counting from top)... wow, reading, is not your best quality is it ;) hahah, I'm kiddin' dude ;)
  6. FederalProgrammer

    replacing double space by a single

    here's the actual news_id = 150 as it's stored in db ;) <p class=\"MsoNormal\" style=\"MARGIN: 0in 0in 0pt\">Daily Market Update<span style=\"mso-spacerun: yes\"> </span></p><p class=\"MsoNormal\" style=\"MARGIN: 0in 0in 0pt\"> <p /></p><table style=\"BORDER-RIGHT: medium none; BORDER-TOP...
  7. FederalProgrammer

    replacing double space by a single

    hahahaha, u're awesome.... try the following link: http://www.hessiancapital.com/read.php?nid=150 and open the source from view... do a ctrl-F and look for "falling off the cliff"... you won't miss it ;) thanx so much!!
  8. FederalProgrammer

    replacing double space by a single

    ok, That problem is gone now.... check this out: “falling off the cliff” is replaced by "?" notice how: “falling off the cliff” differs from "falling off the cliff"
  9. FederalProgrammer

    replacing double space by a single

    well, I guess it comes down to replace: <span style=\"mso-spacerun: yes\"> </span> with " " I'm not so good at this... I'm making far tooo many funny attempts :(
  10. FederalProgrammer

    replacing double space by a single

    hay check this out, Whereever there's a space, the stupid html editor puts the following: <span style=\"mso-spacerun: yes\"> </span> I need to replace that whole thing with a simple space... would this be the way to do it (because it's not working): $newsText = str_replace("<span...
  11. FederalProgrammer

    replacing double space by a single

    darn, almost... I'm trying a few permutations to see if it works... but no luck so far :( --------------- www.enyotic.com/corporate/
  12. FederalProgrammer

    replacing double space by a single

    This is the code for read.php where I display the news: <? session_start(); if($_SESSION['logedin'] == 'yes') { $head = 2; } else { $head = 3; $_SESSION['logedin'] = 'no'; } include('includes/head.php'); include('includes/functions.php'); include('includes/connect.php'); if...
  13. FederalProgrammer

    replacing double space by a single

    ah dude, that would be awesome!!!! Just one thing though, when I put this in pure html it works... it doesn't work, when I put it in my website. I'll give you my php code too then... Following is what I get from teh database though: <body><p class=\"MsoNormal\" style=\"MARGIN: 0in 0in...
  14. FederalProgrammer

    replacing double space by a single

    here's the problem, My user uses an html editor to enter their text. The html editor creates all sorts of html tags and stuff. I store this text in my Database. Then when I fetch the news from the database, I remove the <html></html><head></head><body></body> tags and then put the text in a...
  15. FederalProgrammer

    replacing double space by a single

    yeah, I thought so... it's not working... it's tooo frustrating... I thought may be the usage of single quotes is causing a problem... but I guess that's not the case :( would it help if I provide the link where you can see these ugly question marks?
  16. FederalProgrammer

    replacing double space by a single

    hay, thanx for the reply ;) I guess my question is: is there a difference between: $newsText = str_replace(' ', ' ', $newsText); vs $newsText = str_replace(" ", " ", $newsText); and how would I replace double quotes w/ space? $newsText = str_replace(???, " ", $newsText); where ??? is a...
  17. FederalProgrammer

    replacing double space by a single

    I am grabbing a huge html text from a database and I have to strip off the unwanted junk before I can use the text: $newsText = $row->news_text; $newsText = str_replace("\'", "'", $newsText); $newsText = str_replace("\"", '"', $newsText); $newsText = str_replace(" ", " ", $newsText); I...
  18. FederalProgrammer

    Alternative to AND/OR?

    Hmmm, Almost! but not quite :( See, your suggestion would work for when the search is for: {1, 2, 3, 4}; However, it would fail for {1, 2, 3} given the following test-dataset: ID toppingID 0 0 1 1 1 2 1 3 2 1 2 2 2 5 3 2 3 5 4 1 4 2 4 3 4 4
  19. FederalProgrammer

    Alternative to AND/OR?

    AWESOME!!!! PHV, I've tried it, and it seems like your suggestion is working. It is making sence too!! NiCe!!!! SELECT ID FROM table G WHERE AnotherGroupID IN (1,2) AND 2=(SELECT Count(*) FROM table WHERE ID=G.ID) GROUP BY ID HAVING Count(*)=2 Juliane26, it was almost working. In fact, I...
  20. FederalProgrammer

    Alternative to AND/OR?

    It is an impossible query. In that query, you are applying the following filter: number of values in $A_Set_of_anotherGroupID=(SELECT Count(*) FROM table WHERE ID=G.ID) I don't see how this filter effects the outcome of the query :( Why don't you run your suggested query and see if it...

Part and Inventory Search

Back
Top