phpjs Questions

21

Solved

Is there a way in JavaScript to compare values from one array and see if it is in another array? Similar to PHP's in_array function?
Alcot asked 23/4, 2009 at 23:45

5

Solved

Is there an equivalent of PHP's preg_match_all in Javascript? If not, what would be the best way to get all matches of a regular expression into an array? I'm willing to use any JS library to make ...
Hinckley asked 11/6, 2009 at 21:25

6

Solved

I have the following PHP-script, now I need to do the same thing in JavaScript. Is there a function in JavaScript that works similar to the PHP function, I have been searching for days but cannot f...
Obsequent asked 7/3, 2011 at 7:48

8

Solved

what's the equivalent of this function in javascript: http://php.net/manual/en/function.uniqid.php Basically I need to generate a random ID that looks like: a4245f54345 and starts with a alphabet...
Jota asked 2/2, 2011 at 8:51

2

I am looking for the javascript equivalent of php unpack() function? can someone direct me please. Thanks!
Notwithstanding asked 5/9, 2011 at 8:22

9

Solved

Really like that function. $matches = array('12', 'watt'); list($value, $unit) = $matches; Is there a Javascript equivalent of that?
Damiondamita asked 23/12, 2009 at 18:11

3

Solved

Is there an equivalent of the PHP function preg_split for JavaScript?
Fitch asked 26/7, 2011 at 1:34

2

Solved

Possible Duplicate: jQuery convert line breaks to br (nl2br equivalent) Currently I add <BR> for each evt.which == 13. Is there a nl2br() for JavaScript, so I can do away with t...
Unexacting asked 19/9, 2011 at 7:50

4

Can I use preg_match to validate phone number in jQuery? Here is my code which does not work: if (!preg_match("/^[0-9]{3}-|\s[0-9]{3}-|\s[0-9]{4}$/", phone.val() )) { phone.addClass(&quo...
Wherewith asked 17/5, 2011 at 13:27

3

Solved

I am trying to find an equivalent function for Javascript. What I am trying to do is look for the current URL and if it has the following first part of the URL then do something. In PHP I have thi...
Condyle asked 27/10, 2010 at 15:29
1

© 2022 - 2024 — McMap. All rights reserved.