Jump to content

jeeva

Members
  • Posts

    147
  • Joined

  • Last visited

    Never

Everything posted by jeeva

  1. hi there, I have a array like $arr[0]=array("name"=>"jeeva","gender"=>"M","age"=>"26"); $arr[1]=array("name"=>"mercy","gender"=>"F","age"=>"16"); $arr[2]=array("name"=>"priya","gender"=>"F","age"=>"46"); and i need to search within the array and get the matching record like, i will search like below $name="jeeva"; $gend="M"; And it should give result like $arr[0]=array("name"=>"jeeva","gender"=>"M","age"=>"26"); Could you please give me a solution? Jeeva
  2. hi there, I have a array like $arr[0]=array("name"=>"jeeva","gender"=>"M","age"=>"26"); $arr[1]=array("name"=>"mercy","gender"=>"F","age"=>"16"); $arr[2]=array("name"=>"priya","gender"=>"F","age"=>"46"); and i need to search within the array and get the matching record like, i will search like below $name="jeeva"; $gend="M"; And it should give result like $arr[0]=array("name"=>"jeeva","gender"=>"M","age"=>"26"); Could you please give me a solution? Jeeva
  3. thanks nafetski, Let me explain, i'm doing some sever and client side script using SOAP. So i need to pass the value from server to client. First i'm converting word document and stored in a variable. then i will encrypt the content using base64_encode and assign the value in xml. have a look at example below Server Side: $wordcontent="document content..."; $encryptcont=base64_encrypt($wordcontent); $xml="<?xml encoding="ISO-8859-1"?> ....."; $xml.="<content><![CDATA[".$encryptcont."]]></content>"; And then, I will parse the xml in to php array Client Side: $ResArr=parsexml($xml); $content=base64_decode($ResArr[content]); Here is the problem, here i'm not getting the proper content..i'm getting some junk character... Hope you understood. Thanks Jeeva
  4. Hi frnds, i have a problem with base64_encode i'm using base64_encode function in xml like $content="some word document content here"; $xml="<content><![CDATA[".base64_encode($content)."]]></content>"; here its working fine.. the problem is while retrieving the content from xml $xmlcont="word document content here after removed xml tag"; echo $con=base64_decode($xmlcont); its giving some junk character. Please help what's wrong with this code? please give me some other solution if you have faced anything like this. Thanks Jeeva
  5. Dear Frnds, I am in big trouble now, My Problem is i have a network table like below Uid | ParentId | Flag ------------------------------------------ Jeeva | Ajith | 1 (=>Right) john | Ajith | 2 (=>Left) senthil | Jeeva | 2 mercy | Jeeva | 1 kahn | john | 1 smith | john | 2 So, the network will be like Ajith | / \ Jeeva John / \ / \ Mercy Senthil kahn smith Now i have to take ajith network as LEFT and RIGHT separately. so which way i have to right the query to get that network. I am not good with mysql query, Please help me out Thanks Jeeva
  6. Dear frnds I have table like +--------+---------+ | fromid | toid | +--------+---------+ | jeeva | ajith | | jeeva | senthil | +--------+---------+ From this table i have to get mutual friend by giving two id. For Example Senthil is viewing ajith's record. Here i have to get mutual friends for ajith and senthil. here jeeva is mutual friend for both..How can i get that record 'jeeva'. Note: I am not in the position to use join query because if i have more records then join query would be very slow. Please help me out.... Thanks Jeeva
  7. Try FckEditor to load the html file Look at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Integration/PHP Hope it helps! Jeeva
  8. jeeva

    Day Count

    yes, You r right......
  9. jeeva

    Day Count

    Thanks frnds, I got this simple code .... <?php $month = 5; $year = 2008; $sd = mktime(0,0,0,$month,1,$year); $n = date('N',$sd); $fr = 5; //day of the week $frd = $fr-$n; $nof = 4; //default no.of fridays in a month $ad1 = mktime(0,0,0,$month,$frd+1+28,$year); if(date('m',$ad1)==$month) $nof++; echo $nof." fridays for the month ".date('M-Y',$sd); ?> Thanks Jeeva
  10. Hi Frnds, I want to get how many fridays is there in a particular month? I have spend an hour on searching in net but i couldn't able to get this... anyone has done this?
  11. If u have table like Id Name 1 xxxxx 2 yyyyy Now we will get submitted data like $_POST['Id']="3" $_POST['Name']="zzzzz"; Here we have table field name and values as well...By using this array u can make sql statement....
  12. You can just print the submitted values.... <?php print_r($_POST); ?> This will give u like $_POST['<Keys>']="<Values>"...etc That key will be Field Name....
  13. Hi frnds, Could you please give me the example for insert and display all inserted values in the same page using ajax? Thanks Jeeva
  14. Hi frnds, How to give expire time for a particular session? For Example: I have two session variable like $_SESSION['id']="jee5" $_SESSION['name']="jeeva" now i want give expire time for $_SESSION['name'] not for $_SESSION['id'] Hw can i do this? Jeeva
  15. Hi frnds, Wt is Control array in php? As i come across a interview, i ask u this question that i really don't know abt... This qtn was asked by recruiter.... Jeeva
  16. No one......................... :'(
  17. a small problem Crayon Violent.. If the string is like then it gives but it should be like
  18. i am sorry Crayon Violent.... Your code is working...i just made a small mistake with ur code... really sorry... Thanks a lot Crayon Violent
  19. No actually,the output is "php perl". there is no "and" between 2 words
  20. Thanks Crayon Violent, It works but when i try to replace with "and" it returns same output Modified code <?php $str="php and and and perl"; preg_match_all('/and/',$str,$count); $limit = count($count[0]) - 1; $replace=preg_replace("/and/","and",$str,$limit); echo $replace; ?> output remains same "php and and and perl" NOTE : one "and" should be there instead of more than one "and".
  21. Hi frnds i'm having a problem with string replace. My problem is, i have a string like $str="php and and and perl"; now i have to make the string "and and and" in to "and". In order to do that i have following code.but it does not seems to work <?php $str="php and and and perl"; $replace=preg_replace("/( and ){2,20}+/"," and ",$query); echo $replace; ?> output it retruns the same "php and and and perl"; Please let me know wts wrong with my code.. Thanks Jeeva
  22. Actually the problem is because of Lucene index server. I'm using lucene index server for search module..User can view 100 result at a time.. so if i make request to lucene in every time than its getting delay. can i get save all result somewhere in browser before loading? so that i can show the result as soon as user click the link... NOTE: Total result can be more than 3 lakh Is it possible? if yes how? thanks Jeeva
  23. Hi frnds, I am doing the search module Actually i have problem with loading the result even if i have loaded by ajax. And i have optimized query and code too. Still i have this problem Is there any possible way to get it fast? Please help me out.... Thanks Jeeva
  24. I have got a code that is very simple and good here that code <?php $str='1 and (2 and 3) and (4 or 5) or 6'; $tst=split("\)|\(",$str); print_r($tst); ?> Thanks frnds Jeeva
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.