The best (and currently only) way to use php in a block is to actually create your own block. Study the existing blocks to get an idea of how they work - for example you may need to access existing system variables - you do this by using "global", e.g. global db; for using phpBB derived SQL functions. You need to follow the same file naming conventions (blocks_imp_yourblock.php) and create also template block (yourblock_block.tpl). You must make sure you define your code within a function of same name as block, e.g. function imp_yourblock_block_func()... Its not too hard
