php

compare string in array php

hi In php a[]={'jeans','nishalli','baseses.','hude','htad','dfsdf','dfee','ddddd','ddfsa','fsadfa','dsfdasf','dfasdf','dsfdasf','dfdasf'}; i want to search the keyword = baseses how to i can get the word baseses. please help me..... ...

database connection in php with MS Access on linux hosting

Hi I am running on php. And in my local I am working on windows environment so it was easy to connect to MS Access Database using ODBC connector. But on my live server environment there is Linux so there is a problem regarding the DB connection. So what are the steps to connect to MS Access DB in Linux environment using php. Thanks...

Php mail reader

Hi guys, anybody know any PHP library to read various mail services? Like Hotmail, Gmail, yahoo? It would be great if the library could parse the email and mark as read... Thanks ...

Where to put certain logic in CakePHP

I've recently started to rewrite a project I did a few years ago using CakePHP. I'm trying to do everything 'right' this time, so maybe someone get give me a a pointer on doing to the following: I'm showing a simple table from a table using Model->find('all') in the View. There are two boolean fields in this table, that together make up...

PHP and c#: How to generate alphanumeric id for web content?

I want a script in PHP and c# which will generate id's like the following sites are doing: Youtube http://www.youtube.com/watch?v=OdAE3cWlmHw is doing it like OdAE3cWlmHw Bit.ly http://bit.ly/2pUswX doing it like 2pUswX What will be the function to generate such type of unique id's in PHP and c#? ...

How to process a form with CodeIgniter

I am new to CodeIgniter. I need to process a form. I have a form.html page in view <html> <head> <title>Search</title> </head> <body> <form action="search"> <input type="text" name="search" value="" size="50" /> <div> <input type="submit" value="Submit" /> </div> </form> </body> </html> a...

Replace any string before "/", PHP

Hello, I want to replace any string before "/", irrespective of the string length. Thanks Jean ...

What is the meaning of @ in php?

Possible Duplicate: What is the use of @ symbol in php? I like to know the purpose and meaning of @ in php codes. For instance, @umask or @ini_set. What's the difference without @ and with @? ...

Beginner data caching in PHP

I'm using simpleXML to go through the XML results of a Twitter XML file, but I'm completely lost as to caching the results with PHP. This article seems to be of some help, but I've come across memcache (and memcached. C'mon, namers.) as well, and I have no idea what to do. I'm using this: $sxml = simplexml_load_file( 'http://api.tw...

Memcached set() fails: WRITE FAILURE

So Memcached fails to write certain keys, getResultMessage() says WRITE FAILURE I'm using this in setup: $this->mmcache = new Memcached(); $this->mmcache->addServer('localhost',11211, 100); $this->mmcache->setOption(Memcached::OPT_BINARY_PROTOCOL, true); $this->mmcache->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY...

php problem in isset and empry

array(4) { ["id"]=> int(0) ["pass"]=> string(0) "" ["log_in"]=> string(3) "no" } now the problem in id when using isset it return true because its 0 when using empty i think its doing the same please help me is determine the best function to know its set or not ...

APC is showing 100% fragmentation

Is this bad? Does it mean that it's not helping at all? What paths do I go down to improve situation? Thanks in advance. ...

In php , i have send a mail using mail() , it must not saved in my sent items folder

Hi Send email using mail function working fine. but my question is how to auto save the mail in sent items folder when mail sent i m using own smtp server and port no is 25 is any config needed on php ini file or i may use imap my code is as follows <?php function send_email($from, $to, $subject, $message){ $headers = "From: ".$fro...

How to integrate support for Autopaging Plugins

How do I make my website compatible with all those autopaging plugins out there that load the next page beneath the current, thereby saving a page reload? ...

Need to extract values from a XML file

Hello, I have a XML file, and the layout is such <author> <name></name> <iso></iso> <price></price> </author> I know how it loops. I want to know how I can extract the value of <name> Thanks Jean [edit] my apologies, if in the <author> <name> <first_name></first_name> <last_name></...

Which value query function return in case of a failure?

I'm using SQLite with PHP and I want to know if my query failed or not. Does query return FALSE in a case of a failure? ...

CakePHP: Execute code before some model methods

Right now I have several methods in my model which all fetch the same object at their beginning (the model's parent class). I would like to do this automatically and execute some code beforehand. I would like to say "execute fetchParent() before you call the methods getParentId(), getParentTable() and mayChange()". It it not sufficient...

CakePHP paginate conditions in derived fields

Hello, i would like to paginate a list of games, where the sport is a chosen sport. the relatition is as followed: Game BelongsTo Competition BelongsTo Team BelongsTo sport What i would like to do is show all games where the teams sport_id = 1. The following doesn't work: $this->paginate = array('limit' => 30, 'page' => 1, ...

wordpress plugin for attaching galleries to posts

Is there a wordpress plug-in which enables you to attach image gallery to your news/post? ...

PHP - Extracting text from HTML

I have a long string of HTML that contains <p> <img> <span> and a bunch of other tags. Is there anyway of extracting ONLY the text within the tags from this string? ...