php

What is the story on $variable->something in PHP?

I've seen this used a lot, especially with SimpleXML. Is this: $row->unixtime simply the same as doing this??? $row[unixtime] What is this called, why/how should it be used? ...

Tabbing in PHP?

i have these kind of tabs on my page Equ | Tax | Balanced | Debt | Funds | ETF | Gilt ....... and then there's space below these tabs. When user clicks on these tabs then a data corresponding to these tabs has to be displayed in that space without changing the url of the page.Like when i click Equ then its data will be displayed in...

Upgrades to Drupal in production

Does anyone have a good Drupal upgrade strategy for an install that is in production? No one talks about this in books and it's hard to find a definitive answer in forums and email lists. Ex: Lock down prod, don't allow updates to data copy prod copy prod database to dev turn off all modules in dev upgrade core Drupal in dev (update ...

In PHP, what's the diff between 'stripcslashes' and 'stripslashes' ?

just.... don't know why two strip slash function. ...

Sentence normalization

I'm running a site that allows users to make comments, and most of them are highly uneducated and cannot use proper punctuation, capitalization, and etc. I'm looking for some sort of function that will take their garbage text, and make it look nice. For example: before: this is a test. i LIKE PIE after: This is a test. I like pie. ...

Calling Math Editor (CLOSED)

Hi all... Is there is a library for invoking math symbols/formula(not sure what to call), which are design specifically to be added in a websites called maybe in html, php or javascript code. Just like the button for bold, italic, link, etc. above the textarea in answer/ask ques page(sorry bout earlier), there will be another icon to ...

Quick question about MVC in Php

Currently, I am working on restructuring an existing code base. I'm new to php frameworks, but I do know in general how MVC works. Right now, there is one controller file, one model file, and thirty view files. Should every model correspond to a table? Should every view correspond to an html page? What about the controller? How can I...

PHP -> CLI has stopped working.

I recently installed Windows 7 on my desktop and the following problem has begun occuring: I regularly run some PHP scripts from the commandline that are now giving this error in a popup window: CLI has stopped working. I cancel this and my script terminates. Not good... I've googled around and tried most of the few ideas suggested ...

How to delete an array element based on key

For instance Array( [0] => Array ( [0] => hello [1] => open ) [1] => Array ( [0] => good [1] => center ) [2] =>...

Zend_Form from ini, set multiOptions with string values

I'm trying to configure a form for Zend_Form using Zend_Config_Ini, and wish to set the options for a select element in the .ini file. This works fine for options with single string values, i.e. user.exampleform.elements.subject.options.multiOptions.example = "Example Label" However, I can't work out how to use a string for the value...

PHP and regex to find files in directories and then run regex

hi, what's the the most efficient way to find text files in different directories and then run regex to those found files. I will run php/scripts locally. Let's say I have D:\Script\ where i want to run my script from and D:\Script\folder_01, D:\Script\folder_02, etc. where i want that script to look the files from. Those folder names a...

Basic OO with PHP

without telling me to buy a book, would anyone be interested in answering the following question? if i am in a namespace with a class named foo. and i wanted to build another class called bar. how would i proceed to make foo, aware of bar and vice versa? at what cost? keep in mind that there could potentially be a whole microcosm of us...

[HTML/PHP]: Do I need to change the extension of .html file ...

If I create a simple .html file with a table inside it. Within one of the columns of a table, if I insert PHP opening and closing tags, and even just type echo, it is not working. Do I need to change the extension of the file to .php? ...

clean url on iis server

Hallo, can someone tell me how to get clean url' s on the IIS server where my site is hosted. I already emailed them, but I don' t count on any response anytime soon. with clean url, I mean to use path separators instead off variables like: ?url=bla actually, same as stack overflow problem with IIS is that it does not have htaccess ...

can any one tell about indexing in solr ?

I am just a learner in Drupal, Solr so can any one guide me how to implement indexing and how it is being updated in solr indexing whenever any updates being happened in Database so that in searching to get the recently posted also. ...

[PHP]: Remove URL part and file extension with strstr

I tried function: strstr, but it has one problem. Suppose, the URL looks like: http://www.example.com/index.php With strstr, I am able to remove anything before '/', but I want just: index i.e., the actual name of the file without extension. ...

php - counting values from an array

Hi all, I'm trying to count all the values inside an array, I've tried using count() but to no avail, the array values may also have negatives in them, example: Array ( [name] => 1 [phone] => 1 [emailX] => 1 [car] => 0 [finance] => 2 [employed] => 1 [credit] => -5 ) If you count all of them together, the re...

How to implement server-sided applications that can process user's inputs?

There are some web-based services such as converting .flv files into .mp3 files, .doc files into .pdf files, etc. These are the servers that take files from the user and apply respected applications (such as conversion). After that, the converted file may be available to the requested user. I understand a little bit about writing a text...

Question regarding PHP and XHTML Form

Hi , Is it possible once I have submitted a form to carry the uploaded file to the next page and place it back into a new form ? ...

error handeling returns blank

I have the following snippet from my code: switch ($extention) { case "gif": $src = @imagecreatefromgif($uploadedfile); break; case "jpeg": $src = @imagecreatefromjpeg($uploadedfile); break; case "png": $src = @imagecreatefrompng($uploadedfile); break; default: $src = @imagecreatefromjpeg($uploadedfile); break; } if(!$src) die("...