You are here: finding arrays in a string? « PHP Language « IT news, forums, messages
finding arrays in a string?

Posted by Oliver Spiesshofer on 10/20/05 15:58

Hi,

I want to find all arrays found in my code that are used for a language
file function in order to make sure I list only those that are used in my
language file.

so I thought I scan through all files & folders of the code and find all
arrays that are startign with "$LANG..."

so lets say I have a code line where the word "yes" is translated in an
array called $LANGADMIN, used in the file admin.php, there would be the
following string somewhere in that file:

.... $LANGADMIN['yes'] ...

In the end I want to have a list such as:

ARRAY NAME FILE
$LANGADMIN 'yes' admin.php

now I have a function that goes through all folders, all files and all
lines of those. But I am lacking the regex to match the arrays, and there
might be more than one in one line.

can someone help me with that? I have been trying forward and backward with
many things, but I wont come to the proper regex.

thanks

Oliver

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация