- Strength to Increase Rep
- +11
- Strength to Decrease Rep
- -2
- Upvotes Received
- 176
- Posts with Upvotes
- 142
- Upvoting Members
- 80
- Downvotes Received
- 8
- Posts with Downvotes
- 8
- Downvoting Members
- 5
- PC Specs
- 15" Macbook Pro (2011), OS X 10.7.
how do you extract all email addresses from a string and put each extracted email address as an element of a simple array? <?php // define and implement your php function here function get_all_emails($text_field) { // ---- Beginning of Green Section --- // create an empty array $emails = array(); … |
|
I am trying to set up a json object.array to retrieve the data from this mysql query. the data required is posted from java and that seems to work fine, but I get parsing errors. I tried testing the php file and I get the "Parse error: syntax error, unexpected … |
|
i have a problem in displaying the values of a cookie dynamically code goes as... <?php $x=array(); include("connect.php");//database connection file $temp=$_GET['id']; setcookie(count($x)+1,$temp); echo $_COOKIE['$x[1]']; ?> // how do i display the value of cookie every time... it is over written.... i have tried it with using array.. in short i … |
|
|
$string="City" $consonants=array("B","b","C","c","D","d","F","f","G","g","H","h","J","j","K","k","L","l","M","m","N","n", "P","p","Q","q","R","r","S","s","T","t","V","v","W","w","X","x","Y","y","Z","z"); foreach($consonants as $chk2) { if(strpos($string,$chk2)!= false) { $ans2[]=$chk2; } } if(isset($ans2)) { $comment2="Consonants in this string: ".join(" ",$ans2); } else { $comment2="Consonants in this string: None"; } echo "".$comment2."<br/>"; so the error is that the displayed consonants does not include the first letter. what could be wrong? |
Show only duplicate values from array without built in function $arr = array(3,5,2,5,3,9); I want to show only common elements i.e 3,5 as output. |
|
<?php $array['key1']['key2']=array(); array_push($array,$array['key1']=>'one',$array['key2']=>'two') print_r($array['key1']['key2']); ?> can someone tell me if this is possible for multidimensional arrays? revise the code if I am wrong actually I am creating a site for billboards reservation |
|
Hello Sir I want the php code to import the excel data into mysql . pls hel me Thanks |
|
what i want to do is find a word from a text file and delete that word using php plzzzzzzzzz help me......... i can find the word using this codes [CODE] $handle = file_get_contents("files.txtl",NULL); $a="first"; $a=substr_replace($a, '0', 0); $a=explode(" ",$a); $c=0; foreach($a as $y){ if (stristr($handle,"$a[$c]")) $b[]= 'yes'; else $b[]='no'; … |
|
Hi everybody, I need to save same data to a .txt file (using javascript). Please see this example of clicking in an image and get the coordinates ([Click Here](http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/)). The coordinates appear on the bottom of the image. What I need is to save this information (x and y coordinates) … |
|
Okay I have a html upload form here, What is does is displays a browse button so users can upload files to my site, what I want them to be able to do is completly rename the file that they are uploading once they upload it to my site, but … |
|
i am working on codigniter . i am developing basic cms.my view code of generating dynamic pages at front end is <ul id="jsddm"> <?php for ($i=1; $i<=$url['10']['10']['10']; $i++) { ?> <li><a href="<?php echo site_url($url[$i]['0']['slug']); ?>"> <?php echo $url[$i]['0']['page_name']; ?> </a> <?php if($url['11'][$i]['11']>0){ ?> <ul> <?php for ($j=1; $j<$url['11'][$i]['11']; $j++) { … |
|
I need a working code for deleting an uploded file on the ftp server.I do have a script but it dosn't work.. [CODE]<?php // set up the settings $file = 'old.txt'; $ftp_server = someone.net'; $ftpuser = 'user'; $ftppass = 'passwd'; // set up basic connection $conn_id = ftp_connect($ftp_server); // login … |
|
Hi Please could someone kindly help me with an issue I'm having converting date formats. I'd like to convert dates which are in the format mm/dd/yy hh:mm:ss into yyyy/mm/dd hh:mm:ss but am kind of stuck on how to do it. Anyone able to help? Many thanks in advance. |
|
hey guys, anyone here know how to format word doc using PHP?, i already got how to create one, but the formatting is my problem, like setting bold letters, btw i tried html markup it works but the problem though is how to set the page width? it's taking up … |
|
i would like to be able to upload a pdf to a database then later be able to download the book and view it. i want the names of the books to appear as links which when clicked will open the book. the uploading is being done but the downloading … |
|
i am trying to get the value of radio button which is generated by jquery. I think there is some problem in call events. Here is my code. HTML `<div id="divOption1"></div>` Jquery radio button generate `document.getElementById('divOption1').innerHTML = '<input id="option1" type="radio" value="1"/> '+ questions[currentQuestion]['option1'];` here i call jquery function to get … |
|
Hello, how do i add an hour to time with DATE_ADD in DATE_FORMAT? Here is my code : <?php session_start(); include('includes/main_funcs.php'); $db = db(); $reponse = $db->query('SELECT name, message, DATE_FORMAT(time, '%H:%i') AS forTime FROM chat ORDER BY ID DESC LIMIT 0, 10'); while ($donnees = $reponse->fetch()) { echo'['.$donnees['forTime'].'] <strong>'.htmlspecialchars($donnees['name']).'</strong> : … |
|
Hi, Below simple code is not working.. Please suggest?? <?php $userinput=24;?> <a href="s.php?id=<?php echo urlencode($userinput); ?>">test</a> |
|
this is example of my data name month abc Jan xyz Jan efg feb ijk apr mno apr question is, how to group, using while loop, so the result like this **Jan** abc xyz **feb** efg **apr** ijk mno |
|
hai everybody, i need help in my container div indide all the div value is empty means container value is empty message show any body plz help me <div Id=" container1"> <div I'd=" friends-cta"> <php echo $viewee[' name'] ?> </div> <div I'd=" friends-ota> <php echo $viewee[' occupation'] ?> </div> <div … |
|
here is code that I am working on. What it is supposed to do is upload a media file (image, audio, video) and then tell me what type of media it is. $media_type='image'; $filename=$_FILES["file"]["name"]; $extension = explode(".", $filename); $extension = end($extension); //echo $extension; if (($_FILES["file"]["size"] < 50000) && (!$_FILES["file"]["error"] > … |
|
i have two laptops both with xampp installed on them. is it possible for me to view the localhost of another using another with them connected via crossover? i do this as a starting block for what i want to do which is to have a machine that will provide … |
|
i'm developing an app that i intend to run on a client's intranet. i want to ensure that only email addresses with the client's domain should be registered. how do i achieve this using regular expressions? |
|
Yesterday when I was working on php script I noticed that categories and subcategories works seperatly if I clicked on main category its show all articles under this main category and nothing imported from subcategories, now am working on somthing like this, so what should I do to avoid this … |
|
Hye, Anybody can give me an idea on how to get the name of the folder that contain the downloded file? I want to do like this. For example, after the user have download the file, they will be redirect to a page where it will display the location of … |
|
Hi Guys I am currently using the opendir to display all files and folders in a specific directory code below. It displays great however it display each file twice. If it is a folder then it will just display once. I have check the folder on the server and there … |
|
I have a php file that reads a csv file and pulls the data and displays it on the site. But unfortunately I don't know why it creates an extra line which sets the counter to go wrong... How do i fix that? This is my code: <style> table{width:100%; border-collapse:collapse; … |
|
I want to extract the contents from the below link using Rssfeed in php. plz help me someone. i hvae tried all the possibilites,i am not getting. http://www.jacionline.org/current.rss |
|
write a program to print odd numbers series using do while statement |