Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

i wanna ask, how to get specific value from printed html ? example im grabbing website and load html with DOM, i need get value from js video_bal=videojs('video-player'); video_bal.src(window.atob('...
Sean's user avatar
  • 1
4 votes
1 answer
988 views

I'm living my worse nightmare. I have an CentOS server, that is hosting 10s of WordPress website. My clients notice that their websites are opening and after loading it is redirected to (fast....
Rami Alnairab's user avatar
0 votes
1 answer
1k views

i would like to create a file.js with php but i think that in my code there are a lot of errors: i have multidimensional array: $report= array(); $report= array(array(3,6),array(4,8)); that is: ...
Giovanni-Borgia's user avatar
0 votes
1 answer
124 views

how to implement phpjs mail function? This is a little confusing to explain, so bear with me here... Here my code: <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <...
Achmadi Mas Adi's user avatar
0 votes
1 answer
199 views

I try to serialize object data to be saved into a file by php using serialize package by PHP.js. Chrome: fine FF: fine IE9: fine IE9 in compatibility mode (essentially IE7): not fine. Error from ...
Simon Josef Kok's user avatar
1 vote
2 answers
654 views

Actually i'm using node-crawler under Node.js. Then i currently need to use the methods of PHPJS (An External Javascript File). How can i add or include that JS file into NODE.JS environment?
夏期劇場's user avatar
  • 18.5k
0 votes
1 answer
90 views

Example: http://jsfiddle.net/7Cwbn/60/ I'm trying to use array_diff function from PHPJS to check if all of the elements inside selectedFeatures are found inside elem.features, but instead I receive ...
Bob's user avatar
  • 1,385
0 votes
2 answers
2k views

I'm looking for the exact Javascript equivalent of php: $tags = preg_split('/+/', $_GET['q'], NULL, PREG_SPLIT_NO_EMPTY); $p = array_unique(array_map('strtolower', $tags)); sort($p); It's almost done ...
user avatar
2 votes
1 answer
2k views

I am attempting to integrate the PHPJS (http://phpjs.org/) library with some code and am having trouble calling any of the functions and the library's websites does not have a step-by-step for getting ...
Mat Kelly's user avatar
  • 2,358
4 votes
3 answers
2k views

Possible Duplicate: Javascript equivalent of PHP's list() In PHP you can do assignment like this: list($b,$c,$d) = array("A","B","C"); Is there anything like that in JS?
Bill Software Engineer's user avatar
0 votes
1 answer
204 views

Im pretty new to jQuery (since a week) and don't understand why I can't assign the PHP (work.php) array to global var imgArrayThumbs. I'm calling an array of image names created by the php opendir ...
Thomas Walsh's user avatar
90 votes
2 answers
113k views

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 this evt.which ...
X10nD's user avatar
  • 22.1k
6 votes
2 answers
3k views

I am looking for the javascript equivalent of php unpack() function? can someone direct me please. Thanks!
jazz's user avatar
  • 153
16 votes
3 answers
16k views

Is there an equivalent of the PHP function preg_split for JavaScript?
Randomblue's user avatar
  • 117k
2 votes
1 answer
14k views

I'm trying to create the equivalent of PHP's unpack. I've noticed the project PHPJS doesn't have it. I need it for the implementation of base32_encode and base32_decode (using Crockford's alphabet '...
Valentin Brasso's user avatar
5 votes
4 answers
71k views

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....
Mary's user avatar
  • 375
4 votes
6 answers
9k views

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 find ...
user626342's user avatar
0 votes
2 answers
916 views

I have a javascript file linked to a PHP page which has a value that needs be saved for when a form is submitted and the page is refreshed. Is there a simple way to set cookies similar to the method ...
Samuel Meddows's user avatar
18 votes
9 answers
55k views

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 alphabetic ...
Alex's user avatar
  • 66.6k
0 votes
6 answers
12k views

i want to get data from other sites using javascript executed from my website.
Speedy Wap's user avatar
0 votes
2 answers
1k views

How can I write this PHP code in JavaScript? I have no knowledge about JavaScript... :-s <?php $pozethumb=scandir("./pics/flori/thumbs"); $size=count($pozethumb); $nrpoze=$size-2; ...
Bogdan's user avatar
  • 461
7 votes
3 answers
12k views

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 this ...
user avatar
2 votes
0 answers
270 views

Possible Duplicate: Format numbers in javascript I'm in search of a JavaScript function that can produce the same results as the PHP function number_format(150000,0,',',','); is there a JavaScript ...
Elitmiar's user avatar
  • 37.3k
4 votes
6 answers
7k views

Like the str_shuffle() function in PHP, is there a function similar in shuffling the string in javascript ? Please help !
Aakash Chakravarthy's user avatar
0 votes
3 answers
2k views

What is the JavaScript equivalent to the following PHP code: $expTime = time() + (5 * 60 * 60); // now plus 5 hours (5 hour; 60 mins; 60 secs) $expTimeStr = gmdate('Y-m-d\TH:i:s\Z', $expTime);
Alex Polo's user avatar
  • 905
4 votes
2 answers
2k views

I am writing a chrome extension that change part of the url in the current tab and reload the page with the modified url. I am wondering if there is a Javascript equivalent of the php's parse_url ...
defoo's user avatar
  • 5,327
1 vote
4 answers
183 views

please can somebody let me know how to do the following PHP in JavaScript. The vaibles in PHP are Parameters in Javascript. If all three Parameters are set then I would like a PHP script to execute: &...
Bift's user avatar
  • 73
72 votes
9 answers
44k views

Really like that function. $matches = array('12', 'watt'); list($value, $unit) = $matches; Is there a Javascript equivalent of that?
Markus Hedlund's user avatar
0 votes
2 answers
6k views

I really don't understand Javascript. In PHP, I can remove quotes like this: $tags_array = preg_replace('/"/', '', $tags_array); How do I write it in Javascript?
ajsie's user avatar
  • 80.1k
0 votes
3 answers
220 views

I'm using a JavaScript library called phpjs The goal is to create functions that mimic how PHP handles them. Here's one function in particular: http://phpjs.org/functions/is_float:442 I've written a ...
KdgDev's user avatar
  • 14.6k
1 vote
1 answer
130 views

PHPJS attempts to port php functions over to javascript. http://phpjs.org/ Rationale: people who know php's functions really well can write javascript and just carry over what they know from php ...
dreftymac's user avatar
  • 32.7k
1 vote
4 answers
1k views

In PHP, I can use the strpbrk function to determine if a certain string contains a certain set of characters. Is there a way to do that in JavaScript? TIA. Edit: for those who may know JS but not ...
benjy's user avatar
  • 4,726
19 votes
5 answers
33k views

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 it ...
Alex S's user avatar
  • 26.2k
286 votes
21 answers
373k views

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?
roflwaffle's user avatar
  • 30.8k
6 votes
3 answers
14k views

I have a date input field that allows the user to enter in a date and I need to validate this input (I already have server side validation), but the trick is that the format is locale dependent. I ...
mpeters's user avatar
  • 4,788