
csplrj
Members-
Posts
54 -
Joined
-
Last visited
Everything posted by csplrj
-
json_decode returns a stdClass Object. Is there any way where I can get instance of my class instead of the same? I mean If I json_decode the below string then it will provide me instance of stdClass and not instance of Person class {"name":"a"} How to achieve the same? Thanks in advance CSJakharia
-
I had downloaded facebook PHP SDK and show this issue. I know this issue as it happened even in my one of the PHP project and so want to solve this. I think this has to do something with php.ini setting but don't know what Thanks in advance CSJakharia
-
When I use require('../config.php'); It does not works on my machine but it works on shared hosting Can someone help me what must be the issue? Thanks in advance CSJakharia
-
is there any way to POST array without brackets in name attribute?
csplrj replied to csplrj's topic in PHP Coding Help
I am using some jquery plugin http://jquery.malsup.com/form/ and its not working for that. I will require changing the code for the same and so was asking CSJakharia -
I guess pls set the name from name='emp_list' to name='emp_list[]' CSJakharia
-
How to set innerHTML of DomNode? I am parsing html.I want to change a html of DomNode/DomElement? How to achieve the same? Thanks in advance CSJakharia
-
I have parsed a HTML file using DOMDocument.Now I want to wrap the Node with <span> tag so that instead of "<input type=textbox>" it will be "<span><input type=textbox></span>" Thanks in advance CSJakharia
-
Any type of framework is available which enables the online/offline model just like Google gears? http://gears.google.com/ Google gears enable the synchronization but it does not stores in mySQL and so seeing for some framework which enables the same Thanks in advance CSJakharia
-
does anyone knows of Open Source/Free Reporting Framework/Tool
csplrj replied to csplrj's topic in Application Design
I know that but it requires java Installed on the server. Any other apart from this. -
Does anyone knows of any library or utility which can give me the same functionality as http://commons.apache.org/beanutils/apidocs/org/apache/commons/beanutils/package-summary.html#package_description gives in Java. A way by which I can access nested property of the Class I found one but it supports simple property only not nested property http://www.zend.com//code/codex.php?ozid=1481&single=1 Thanks in advance CSJakharia
-
I got the issue was I have to use instead of $pages1=json_decode($pages); I have to write $pages1=json_decode(stripslashes($pages)); in the Shared hosting Thanks in advance CSJakharia
-
Thanks for the link given as it helped me in identifying the issue I changed the json string and then When I try it does not works in PHP Version 5.2.4 but it works on PHP Version 5.3.1. I have my shared hosting on PHP Version 5.2.4. How to do the same <? $pages=$_POST['pages']; if($pages!=null) { $pages1=json_decode($pages); var_dump($pages1); } ?> <form method="post" id="addPage"> <input type="hidden" value='[{"parentPageId":0, "id":0},{"parentPageId":0, "id":68},{"parentPageId":0, "id":69},{"parentPageId":69, "id":70},{"parentPageId":0, "id":71}]' id="pages" name="pages"/> <input type=submit> </form> Thanks in advance CSJakharia
-
Below is the output for $pages [{"id":0},{"id":64, "websiteId":14, "pageName":"Home", "parentPageId":0, "pageTypeId":1, "orderNo":1, "pages":[]},{"id":65, "websiteId":14, "pageName":"a", "parentPageId":0, "pageTypeId":1, "orderNo":2, "pages":[{"id":66, "websiteId":14, "pageName":"b", "parentPageId":65, "pageTypeId":1, "orderNo":3, "pages":[]]},{"id":66, "websiteId":14, "pageName":"b", "parentPageId":65, "pageTypeId":1, "orderNo":3, "pages":[]},{"id":67, "websiteId":14, "pageName":"c", "parentPageId":0, "pageTypeId":1, "orderNo":4, "pages":[]}]
-
Below is the code I have written for php json decoding. Can't understand the reason Thanks in advance CSJakharia PHP File <? $pages=$_POST['pages']; if($pages!=null) { $pages1=json_decode($pages); //echo((json_encode(array('a'=>1,'b'=>2)))); echo($pages); var_dump($pages1); echo PHP_EOL; //echo($pages1); echo(' JSONERROR='.json_last_error()); } ?> <form method="post" id="addPage"> <input type="hidden" value='[{"id":0},{"id":64, "websiteId":14, "pageName":"Home", "parentPageId":0, "pageTypeId":1, "orderNo":1, "pages":[]},{"id":65, "websiteId":14, "pageName":"a", "parentPageId":0, "pageTypeId":1, "orderNo":2, "pages":[{"id":66, "websiteId":14, "pageName":"b", "parentPageId":65, "pageTypeId":1, "orderNo":3, "pages":[]]},{"id":66, "websiteId":14, "pageName":"b", "parentPageId":65, "pageTypeId":1, "orderNo":3, "pages":[]},{"id":67, "websiteId":14, "pageName":"c", "parentPageId":0, "pageTypeId":1, "orderNo":4, "pages":[]}]' id="pages" name="pages"/> <input type="hidden" value='[{"id":0},{"id":64, "websiteId":14, "pageName":"Home", "parentPageId":0, "pageTypeId":1, "orderNo":1, "pages":[]}]' id="pages" name="pages1"/> <input type=submit> </form> But this output comes NULL JSONERROR=2
-
Setting some array values dynamically at runtime
csplrj replied to csplrj's topic in PHP Coding Help
Thanks that works CSJakharia -
I want to call $addRecord->Documents[0]->name = 'a' but as "Documents" and "name" come from runtime I tried $addRecord->$docs[$i++]->$name = 'a' But it calls instead $addRecord->D->name = 'a' I want to call $addRecord->Documents[0]->name = 'a'. But instead it calls $addRecord->D->name = 'a'? How to achieve the same Thanks in advance CSJakharia
-
Thanks that will solve my problem. Actually i was so used to array_push that i thought i have to use some sort of function and so asked Thanks CSJakharia
-
I want to add a key,value pair to array. I know array_push but it adds only value how to add value alongwith key associated with the same? Something of this sort array_push($array,$key=>$value); Thanks in advance CSJakharia
-
It parses the html content of a website and gets the data from the html which is required to me
-
I have a long running script which may go on for long time may be 4 to 5 hours? How to get running the same in a shared hosting environment? As I tried the same but it seems it does not works in a shared hosting environment? I tried set_time_limit(0); ignore_user_abort(); but it does not seems to works Thanks in advance CSJakharia
-
Does PHP Supports XPath 2.0? If Yes then from which version? If No then is there any other library which can provide the xpath implementation? Thanks in advance CSJakharia
-
I have a HTML document in which there is a <td> tag In this td tag the TextContent is equal to "Type" It is not neccessary that the td tag directly has content,it may have content in the subtags. The "Type" stuff may be enclosed in between the spaces What will be the XPath expression for the same. i am trying this using DomXpath of pHP? <td align="left" style="background-color:#648190;"><span style="color:#ffffff;font-family:arial;font-size:small;"><b> Type</b></span></td> Thanks in advance CSJakharia