dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: jeddik

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    18
    Views
    2,259

    OK - thanks to both. :) I added/changed these...

    OK - thanks to both. :)

    I added/changed these lines then:

    global $lang_cd;

    and this:


    $test_output2 = preg_replace_callback(
  2. Replies
    18
    Views
    2,259

    Hmmm ... thanks. BTW ... How do I pass an...

    Hmmm ... thanks.

    BTW ... How do I pass an extra parameter to the callback function ??

    E.G. I have:


    function titleCase($matches,$lang_cd){
    blah blah
    }
  3. Replies
    18
    Views
    2,259

    Yes, That's what I thought. So, I now have...

    Yes,
    That's what I thought.

    So, I now have this, which for most cases will work a lot faster ??




    function titleCase($matches){
    $string = is_array($matches) ? $matches[1] : $matches;
  4. Replies
    18
    Views
    2,259

    Well, The text could have Turkish or German...

    Well, The text could have Turkish or German characters in it.

    But actually I can test for that because the document will be classified by language anyway.

    Assuming that it is English language...
  5. Replies
    18
    Views
    2,259

    OK - I see ( That's clever !! ) BTW isn't...

    OK - I see
    ( That's clever !! )

    BTW isn't this line redundant ??
    $string = mb_convert_case($string, MB_CASE_TITLE, "UTF-8");


    .
  6. Replies
    18
    Views
    2,259

    I just came back to write that I was correct to...

    I just came back to write that I was correct to have the
    $string = $matches[1]; line in there otherwise
    the string wasn't getting defined.

    Now you have put a little if() stmt to check if...
  7. Replies
    18
    Views
    2,259

    It looks OK to me, I can not see what I did...

    It looks OK to me,

    I can not see what I did wrong here ...


    .
  8. Replies
    18
    Views
    2,259

    Not quite sure what you mean ? You have taken...

    Not quite sure what you mean ?

    You have taken the function that does work ( titleCase_str () )
    and inserted this line $string = $string[1];.

    And this breaks the function.

    Anyway ...
    ...
  9. Replies
    18
    Views
    2,259

    Does anyone know about these...

    Does anyone know about these preg_replace_callback() ???

    Please help.

    Thanks.



    .
  10. Replies
    2
    Views
    685

    Is this preg_replace correct ?

    Hi,

    The HTML5 validator doesn't like '&' in the urls it wants '&'
    so I am trying to change them before they get output from the server.

    I can not stop users from pasting if urls with '&' in...
  11. Replies
    18
    Views
    2,259

    Having trouble with my preg_replace_callback()

    Hi,

    I have a function which converts text into a header format:

    Its nice because I can chose deliminators and exception

    This is the string version:


    function titleCase_str($string){
  12. OK - thanks for sharing that :) It seems to...

    OK -

    thanks for sharing that :)

    It seems to be doing what I need - the addresses are coming out better.

    I will need to work through and comment the code to understand it !!

    Thanks again.
  13. You are both very kind. Thanks very much for...

    You are both very kind.
    Thanks very much for your help.

    Will work on this tomorrow.
    Hopefully get it going :)

    .
  14. This is the code ( including the data ) ...

    This is the code ( including the data )




    $input_data = <<<EOD
    NOW This is a special test and is all about John and his friends Johns like John Smith is now to be a jerk. And this is another...
  15. Hi again. I have been using this little script...

    Hi again.

    I have been using this little script to apply names and addresses
    but still have a problem ...

    The replacing is occurring again with already replaced sets of data.

    For example I...
  16. Thanks. I'll give it a try and come back when...

    Thanks.

    I'll give it a try and come back when I get stuck !!! :)


    .
  17. Thanks for helping :) That looks good. Only...

    Thanks for helping :)
    That looks good.

    Only thing is; I have not used javascript objects before so I am a bit in the dark.

    So when I have my object how would I use it ?
    Is it like a php array...
  18. Its OK - got it working now. Thanks again for...

    Its OK - got it working now.

    Thanks again for helping :)


    .
  19. I hope so :) After all the point of the forum...

    I hope so :)

    After all the point of the forum is to share and help each other.
    We could all spend all day looking at manuals and google'ing stuff
    but then this forum would be DEAD !!!

    Its...
  20. How do I get data from php array into clientside array ( maybe javascript ) ?

    Hi,

    I have a mysql table contain a glossary
    which I would like to accesses from the webbrowser.

    The table is simple, just two columns so could be handled
    by an associatve array in php.

    So...
  21. Which php functions can I use to get the mysql table structures ?

    Hi,

    I would like to know if there are some PHP functions that can
    spit out the table structure for me.


    I wrote a script to build my database like this:
  22. Thanks. Actually, I realised that I needed...

    Thanks.

    Actually, I realised that I needed that when my script
    started outputting only 3 digit results - I had not allowed for that.

    Now it is "padded up" to 6 - it is better :)
  23. That's Great. so I have done : $hexValue...

    That's Great.

    so I have done :


    $hexValue = '00CC99';
    $decValue = hexdec($hexValue);

    for ($i=0; $i<=100; $i++){
  24. OK Thanks - I thought I needed to escape the...

    OK

    Thanks - I thought I needed to escape the \ character so I put that / in


    actually I saw it in bionoid's code:
  25. How do I use a for loop to step thru a hex range and display color ?

    Hi,

    I am trying to display different colors in sequence
    in batches of 100 at a time.

    Reason is to make selecting a color quicker.

    I want to be able to input a starting hex number for the...
Results 1 to 25 of 249
Page 1 of 10 1 2 3 4
HTML5 Development Center



Recent Articles