Can you do
array['Name'];
In C#
Rather than:
array[0];
I know you can do that in PHP but is there an equivelent for C#, although im thinking highley unlikely :(
I just signed up for BlueHost and one of their PHP config options is PHP5 (FastCGI).
I'm going to start using Codeignitor for as must as I can and was wondering if I should enable FastCGI or now.
Sorry if this is in the wrong place (vs serverfault.com)
Is it easy to get the business listings such as when you search in Google Maps?
If there is an API that would be great! In any language, preferable, PHP or javascript
I would like to know if there is something similar to PHP natsort function in python?
l = ['image1.jpg', 'image15.jpg', 'image12.jpg', 'iamge3.jpg']
l.sort()
gives:
['image1.jpg', 'image12.jpg', 'image15.jpg', 'iamge3.jpg']
but I would like to get:
['image1.jpg', 'iamge3.jpg', 'image12.jpg', 'image15.jpg']
The following does not work:
var js_str= '<?php echo $str_from_server; ?>';
The problem is that, $str_from_server can contain any characters. If it contains single quotes or line breaks or others, the above code will break. And I do not have access to the server-side code. What's the easiest way to "escape" the contents of $str_from_server into a javascript string, and then it can be restored later?
Anybody can help me to get date formated with Zend framework
What I do is:
<?php echo new Zend_Date(2010-05-23, false, 'en');?>
Result I get is: May 22, 2010 12:00:00 AM
I what I need is: May 22, 2010
Thanks.
Hi folks,
I use Smarty View, but want to benefit from theme options.
Since for theming cake use Theme View, I cant use both Smarty and
Theme at the same time.
Perhaps can combine the code but am not that familar with View eingine
core.
Already have a lot views done with smarty and do not want to recreate
all of them with plain php.
Is there a ready combined solution i.e. Themed Smarty View?
Thanks
I have noticed that the quality of the images produced by the JPEGEncoder does not match that of other encoders available (i.e. php's built in image compression functions from the gd library)
Any explanation ? or hints/workarounds for improving the quality of compressed images by JPEGEncoder ??
I want to send
www.mydomain.com/approve/SomeFunkyVariable to
www.mydomain.com/home/index.php?option=com_content&task=view&id=574&Itemid=85&approve=someFunkyVariable
What is the rule for this?
I am viewing the Barcardi fanpage (http://www.facebook.com/home.php?#!/bacardi?v=wall&ref=ts) and I see on their wall tab they have a sidebar area they place an advert (probably html) -
http://screencast.com/t/ZGE2MDhlMDM. Thoughts on how I can get this for my fan page?
Is there a simple :) and efficient way or reading very large number of rows sequentially using Zend_Db?
Basically I need to process entire table, row by row. Table is large, primary key sequence is not guaranteed(i.e. not an autoincrement, but is UNSIGNED INT).
What's the best way to approach this?
Environment: PHP 5.2, Zend Framework 1.10, MySQL 5.1
What's the simplest way, if any, to search Twitter for replies to any username that includes <string?
eg, how to search at the same time for replies to @google, @googletech, @firstgooglers, @nogoogle ?
I'm not a competent developer with any language but I can handle some easy JS or PHP or regex & Bash scripting...snippets welcome.
Is there a way to use javascript to determine how long someone was looking at my webpage before they closed their browser or hit the back button? Something like send a message to php page every few seconds or so in the background?
hi,
i have to pages:
domain.com/
domain.com/post.php?id=43
Inside the second page i have added Disqus comments... but i need to know the number of comments in that post in the first page (post list). Is it feasible?
Hello dear commmunity, good day!
I run a little site (now for several months ) that has users accessing big files, for
download as well for streaming to the browser.
It's fairly active, so assuming the worst, how bad is getting php to read the files that would be stored outside of the webroot and then getting it to echo it to a page dynamically for the browser to then read?
My question is: how bad is fread() etc in this context!?
zero
Hello,
this is actually an problem question from project euler site
http://projecteuler.net/index.php?section=problems&id=3
Anyway I'm not out after the solution, but I probably guess you will know what my approach is. To my question now, how do I handle numbers exceeding unsigned int?
Is there a mathematical approach for this, if so where can I read about it?
I'm storing a string in a CCK field.
The problem is getting it back out. I have a node-node_type.tpl.php and ask it
$node->content['field_custom_map_data']['#value']
That returns html, three nested div's and uses HTML entities, I want the pure text, as entered.
What is the Drupal 5 way to fix this?
I have a huge table that is mainly used for backup and administrative purposes. The only records that matters is the last inserted record.
On every hit to order by time inserted is just too slow. I want keep a separate table with the last inserted id.
In PHP I now insert, get last inserted id, and update the other table.
Is there a more efficient way to do this.
I had a rule in the .htaccess file in my root directory that said:
RewriteCond ^(.*)$ $1.php
I've completely rewritten the file since then, and the rule is still being applied. I tried restarting the Apache server and the physical server with no luck.
I've also scoured the directory and there are no other .htaccess files in there or any subdirectories.
Does anyone know what might be causing something like this to happen?
Hi there,
i am planing to set up a new webproject which has to use a database and a model which can be presented in a browser. I looked at a lot of technologies (JSF, PHP, ..) but i could not find a free and easy framework/technology for me (in the end i prefered asp.net, but this is not free).
What can you recommend me for a new webproject from scratch?
How to convert the existing flash site into mobile version existing site in form of the cakephp frame work. We thought that html ,css,php,javascript may work all mobiles.We dont know exactly. Please tell us how many possible way to develop existing site into mobile version and also need to detect the from which browser the request is coming whether mobile browser or pc browser.
The existing site link is :This site convert into mobile version
hi i want to refresh user page with different data but with same template (user-profile.tpl.php) by simply clicking tabs. Can any one suggest the best way to do that ?.
for ex:
tab1:sports , tab2: music tab3: literature
by clicking tabs the template is same but the data is going to refreshed.
Note: Look like profile categories but not the same. all details are from user table
I have a lot of customized javascript and layout design, and I want to prevent as best I can people just copying and pasting and then using it for themselves. Is there any practical way to do this, or do I basically just have to be happy my php code does not show? I want to at least make it difficult to copy my site.
I have been developing websites for some time now and I hardly use any Javascript in my pages.
Whatever I can want to do with JavaScript, it is possible through PHP. Just like ajax itself. We can send a regular request instead of a ajax request, can't we? We can use "include" to include sub part of pages.
So am i missing something about javascript, that I dont know of?